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 PyPIarrow-up-right.

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

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:

circle-info

It is strongly recommended to use the latest version of the imerit-ango package to ensure compatibility with current features, avoid potential issues, and benefit from the latest fixes and improvements.

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.

circle-exclamation

To retrieve your API Key from the UI:

  1. Navigate to your Accountarrow-up-right 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.

circle-info

Creating a new API key will revoke the existing one.

Obtaining Organization, Project, Asset, and Task IDs

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

Organization IDs

To retrieve your Organization ID from the UI:

  1. Navigate to the Accountarrow-up-right page.

  2. Locate the Organization ID field under the Profile tab.

  3. Click the Copy icon next to the field to copy the ID to your clipboard.

Project IDs

To retrieve a Project ID from the UI:

  1. Navigate to Projectsarrow-up-right page.

  2. Search for your project and click to open it.

  3. On the project page, click the copy icon next to the project title to copy the ID to your clipboard.

Alternatively, you can obtain the Project ID from the URL. Project URLs follow this format:

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

Simply copy the <project_id> portion from the URL.

Task and Asset IDs

To retrieve a Task or Asset ID from the UI:

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

  2. Click on the task or asset you want to inspect.

  3. Open the Task Info section from the rightmost panel.

  4. Find the Task or Asset ID and use the Copy icon to easily copy it to your clipboard.

Host and Base URL

This section explains how to configure the API and SDK when working with different Ango Hub instances.

  • EU Instance (Default): Use the default host configuration when your workspace is hosted in the EU region.

  • Other Instances: If your workspace is hosted in a different region (e.g., US), specify the appropriate host parameter when initializing the SDK and update the base URL accordingly in your API requests.

Using the correct host and base URL ensures that your requests are routed to the appropriate regional environment.

Deployment
Domain
Host

iMerit (Default)

https://imerit.ango.ai

https://imeritapi.ango.ai

EU instance (Default)

https://imerit.ango.ai

https://eu-api.ango.ai

US instance

https://us.ango.ai

https://us-api.ango.ai

India Instance

https://in.ango.ai

https://in-api.ango.ai

Test Environment

https://test.ango.ai

https://testapi.ango.ai

SDK & API usage example in EU instance:

SDK & API usage example in other instances:

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

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:

file-download
115B
Sample .env file

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

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

SDK Functions

Project

folder-pluscreate_projectchevron-rightfolder-arrow-downget_projectchevron-rightfolder-xmarkdelete_projectchevron-rightbars-staggeredlist_projectschevron-rightlistcreate_label_setchevron-rightarrow-rotate-rightrequeue_taskschevron-rightarrows-rotatererun_webhookchevron-rightmagnifying-glassreview_taskchevron-rightcircle-checkupdate_label_validationchevron-rightdiagram-projectupdate_workflow_stageschevron-rightboltupdate_tasks_prioritychevron-rightmemo-circle-infoupload_instructionschevron-right

Storage

awscreate_storagechevron-rightcloudget_storageschevron-rightcloud-slashdelete_storagechevron-right

Upload Data

arrow-up-to-lineupload_fileschevron-rightcloud-arrow-upupload_files_cloudchevron-rightuploadupload_files_with_asset_builderchevron-righttable-layoutcreate_asset_builder_templatechevron-righttable-pivotget_asset_builder_templateschevron-rightmessagesupload_chat_assetschevron-righttagsimport_labelschevron-rightpaperclipcreate_attachmentchevron-righttrash-xmarkdelete_assetschevron-right

Batch

table-listassign_batcheschevron-rightgrid-2-pluscreate_batchchevron-rightgrid-5get_batcheschevron-right

Members

envelopeinvite_members_to_orgchevron-rightuser-plusadd_members_to_projectchevron-rightenvelopes-bulkget_organization_inviteschevron-rightuserget_organization_memberschevron-rightstarupdate_organization_members_rolechevron-rightenvelope-opendelete_organization_inviteschevron-rightuser-xmarkdelete_organization_memberschevron-rightcircle-chevron-rightassign_taskchevron-right

Issue

commentcreate_issuechevron-rightcommentsget_issueschevron-rightcomment-slashdelete_issuechevron-right

Export Data

arrow-up-from-bracketexportchevron-rightlayer-groupget_assetschevron-rightclipboard-listget_taskchevron-rightlist-checkget_taskschevron-rightclock-rotate-leftget_task_historychevron-rightchart-lineget_metricschevron-rightgauge-maxget_project_performancechevron-right

Utility Functions

list-treelist_storage_fileschevron-right

Last updated