Skip to content

aliz-ai/aliz-aip-sdk

Repository files navigation

Aliz AIP SDK - An API SDK for Aliz AIP

NOTICE: Contents of this repository is generated by an automation, please do not modify manually!

Installation

Aliz AIP SDK is a Python 3 package, so make sure you're running Python 3.6 or greater.

To set-up the tool in a virtual environment:

cd /path/to/host/the/venv

# Option 1 - From the GitHub repository
virtualenv -p python3 venv
source venv/bin/activate
pip install -U pip setuptools
pip install "git+https://github.com/aliz-ai/aliz-aip-sdk.git@master"

# Option 2 - From the Google Artifact Registry
virtualenv -p python3 venv
source venv/bin/activate
pip install -U pip setuptools
pip install keyrings.google-artifactregistry-auth
pip install --extra-index-url "https://europe-python.pkg.dev/aliz-aip-dev/aip-python/simple/" aliz-aip-sdk

Usage

To use the package, a Google account with access to Aliz AIP is required. This account needs to be able to generate OAuth2 tokens to use with Google IAP. These tokens are needed in order to authenticate to the Aliz AIP endpoints. This package and documentation does not contain the required code to generate the tokens. If you need this information, please reach out to the support team at [email protected].

from aliz.aip.sdk.setup_client import setup_api_client
api_client = setup_api_client()

from aliz.aip.sdk.api import TemplateControllerApi
api = TemplateControllerApi(api_client)

# Fetch the list of available templates
templates = api.get_all_templates()
print("Avaialable templates: {}".format(templates))

# Find a specific template, called e.g. 'Example template'
example_template = next((t for t in templates if t.name == "Example template"), None)
if not example_template:
    raise Exception("No such template")
print("Selected template: {}".format(example_template))

# Find specific template version for template, called e.g. 'v1.0'
example_template_version = next((v for v in example_template.versions if v.version == "v1.0"), None)
if not example_template_version:
    raise Exception("No such template version")
print("Selected template version: {}".format(example_template_version))

# Fetch template variables for the specified template and version
variables = api.get_template_variables(example_template.id, example_template_version.id)
print("Template variables for the selected template and version: {}"(variables))

About

Aliz AIP API SDK repository - generated

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages