SDK Documentation

How to install and use Ango Hub's Python SDK.

We provide a Python SDK to interface programmatically with Ango Hub.

SDK Installation

How to Install the Ango SDK

To start using the Ango SDK, you will need to install the latest version of the imerit-ango python package, available on PyPI.

To download and add the package to your current Python environment, use the following command:

pip install imerit-ango

How to upgrade the Ango SDK

To upgrade the imerit-ango package to its latest version in your current Python environment, use the following command:

pip install -U imerit-ango

Obtaining your API Key

In order to interact with Ango Hub programmatically, you’ll need an API key which can be directly obtained from the account page.

Or follow these steps to obtain one:

  1. Navigate to your Account page in Ango Hub.

  2. Go to the API tab.

  3. Create a new API key or copy your existing key.

For more information, please visit the How to get your API key page.

Creating a new API key will revoke the existing one.

Obtaining Organization, Project, Asset, and Task IDs

Ango Hub assigns unique IDs to organizations, projects, tasks, and assets. These IDs are often required for interacting with the SDK.

Organization IDs

To obtain an organization's ID from the UI:

  1. Navigate to your Account page.

  2. You'll see a row called Organization ID. Click on the "Clipboard" button next to it to copy the ID to your clipboard.

Project IDs

To obtain a project’s ID, open the project in Ango Hub and look at the URL in your browser’s address bar. The URL will follow this format:

https://imerit.ango.ai/projects/<project_id>

Simply copy the <project_id> from the URL.

Task and Asset IDs

To obtain a Task or Asset ID:

  1. Navigate to the Tasks or Assets tab in your project.

  2. Open the task or asset you need.

  3. In the right-hand panel, under Task Info, you’ll find the relevant ID.

To make this process easier, you can use the Copy to Clipboard button available in the interface.

Environmental Variables

Snippets on this page make the assumption that you have your API key and other variables set as environmental variables.

To set environmental variables, install the python-dotenv package from pip by running

pip install python-dotenv

in your Python environment.

Then, create a file called .env in your environment's root folder. The contents of this .env file will look like this:

API_KEY=00af1132-0558-4ec7-93e3-46826a455ac0
ORGANIZATION_ID=12a12345678b1234567aa12a
PROJECT_ID=1233453123dsfdf012

In your Python scripts, import the package and load the environmental variables by running load_dotenv() before using the variables in your script.

import os
from dotenv import load_dotenv

load_dotenv('variables.env')

You will then be able to access your environmental variables by using os.getenv("VAR_NAME"), like so:

API_KEY = os.getenv('API_KEY')

Project and Organization Level Grouping of SDK Functions

Project Level SDK Functions

add_members_to_projectassign_batchesassign_taskcreate_attachmentcreate_batchcreate_issuecreate_label_setcreate_projectdelete_issueexportexportV3get_assetsget_batchesget_issuesget_metricsget_projectget_taskget_tasksget_task_historyimport_labelslist_projectsupdate_workflow_stagesupload_filesupload_files_cloudupload_files_with_asset_builder

Organization Level SDK Functions

create_storagedelete_organization_invitesdelete_organization_membersdelete_storageget_organization_invitesget_organization_membersget_storagesinvite_members_to_orgupdate_organization_members_role

Subject-Based Grouping of SDK Functions

Project

create_projectget_projectlist_projectscreate_label_setupdate_workflow_stages

Storage

create_storageget_storagesdelete_storage

Upload Data

upload_filesupload_files_cloudupload_files_with_asset_builderimport_labelscreate_attachment

Batch

assign_batchescreate_batchget_batches

Members

invite_members_to_orgadd_members_to_projectget_organization_invitesget_organization_membersupdate_organization_members_roledelete_organization_invitesdelete_organization_membersassign_task

Issue

create_issueget_issuesdelete_issue

Export Data

exportexportV3get_assetsget_taskget_tasksget_task_historyget_metrics

Last updated