Ango Hub Python SDK
A comprehensive Python SDK to interface programmatically with Ango Hub, iMerit's data annotation and AI training platform.
Overview
The iMerit-Ango SDK provides a powerful Python interface for interacting with Ango Hub, enabling you to:
- Manage Projects: Create, configure, and manage annotation projects
- Upload Data: Import assets from local storage, cloud storage (AWS S3, GCP, Azure), or URLs
- Handle Annotations: Import and export annotations in various formats (COCO, YOLO, KITTI, Ango native format)
- Workflow Management: Manage labeling workflows, batches, and task assignments
- Team Collaboration: Add team members, manage roles, and track performance
- Integration: Connect with your existing ML pipelines and data infrastructure
Installation
Install the latest version from PyPI:
pip install imerit-ango
To upgrade to the latest version:
pip install -U imerit-ango
Quick Start
1. Get Your API Key
First, obtain your API key from your Ango Hub account page:
- Navigate to your Account page in Ango Hub
- Go to the API tab
- Create a new API key or copy your existing key
For scripts and integrations that should not depend on a person's account, an organization admin can create a service account under Organization → Service Accounts instead. Its key starts with ango_sa_, is shown only once, and is passed as api_key in the same way; it can only call what its scopes allow.
2. Basic Usage
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
# Load environment variables
load_dotenv()
# Initialize SDK
sdk = SDK(api_key=os.getenv('API_KEY'))
# List your projects
projects = sdk.list_projects()
print(f"Found {len(projects)} projects")
# Get project details
project = sdk.get_project(project_id=os.getenv('PROJECT_ID'))
print(f"Project: {project['name']}")
SDK Functions Overview
Project-Level Functions
- Project Management:
create_project(),get_project(),list_projects(),clone_project(),delete_project(),purge_project() - Data Upload:
upload_files(),upload_files_cloud(),upload_chat_assets() - Batch Management:
create_batch(),assign_batches(),get_batches() - Task Management:
get_tasks(),assign_task(),requeue_tasks() - Annotations:
import_labels(),export(),exportV3() - Team:
add_members_to_project() - Performance:
get_metrics(),get_project_performance()
Organization-Level Functions
- Storage:
create_storage(),get_storages(),delete_storage(),list_storage_files(),get_storage_upload_url(),get_storage_download_url() - LLM:
create_llm(),get_llms(),delete_llm() - Members:
invite_members_to_org(),get_organization_members() - Permissions:
update_organization_members_role() - Notifications:
send_notification()
Deleting a project
delete_project(project_id) soft-deletes the project and its assets, tasks, issues, and histories. It does not purge storage.
purge_project(project_id, confirm_name) does that soft delete and also deletes the {project_id}/ prefix in the default bucket. confirm_name must match the project name. Files in customer-connected external storage are not deleted.
Supported Asset Types
The SDK supports a wide variety of data types:
- Images: PNG, JPEG, TIFF, BMP, WebP
- Videos: MP4, AVI, MOV, WebM
- Medical: DICOM, NRRD files
- Documents: PDF, Markdown, HTML
- Text: Plain text, NER datasets
- 3D Data: Point clouds, multi-sensor fusion
- Audio: WAV, MP3, FLAC
- LLM: Chat conversations and responses
Documentation
Comprehensive Documentation
Full SDK documentation is available at: https://docs.imerit.net/sdk/sdk-documentation
Key Resources
Examples
Upload and Create a Labeling Project
# Create a new project
project = sdk.create_project(
organization_id=org_id,
name="My Annotation Project",
description="Object detection for autonomous vehicles"
)
# Upload images from local directory
sdk.upload_files(
project_id=project['_id'],
file_paths=['/path/to/images/*.jpg']
)
# Create batches for organized labeling
batch = sdk.create_batch(
project_id=project['_id'],
batch_name="Training Set Batch 1"
)
Clone a Project
Clone copies project settings into a new project named {name} copy in the same organization. Assets, tasks, labels, and annotations are not cloned.
# Copy all settings (schema, assignees, batches, workflow, plugin presets, general settings)
cloned = sdk.clone_project(project_id)
# Exclude some sections from the copy
cloned = sdk.clone_project(
project_id,
batches=False,
plugin_presets=False,
)
Upload to a Connected Storage
Plugins and scripts can write to and read from a connected storage with only its ID. The server signs the URL, so the storage credentials are never sent to the client.
import requests
upload = sdk.get_storage_upload_url(storage_id, "my-bucket", "plugin-output/report.json")
with open("report.json", "rb") as f:
requests.put(upload["url"], data=f, headers=upload["headers"]).raise_for_status()
download = sdk.get_storage_download_url(storage_id, "my-bucket", "plugin-output/report.json")
content = requests.get(download["url"]).content
Upload URLs need an organization admin API key, and service accounts also need the storages:upload scope. URLs last 24 hours by default (expires_in sets a shorter lifetime); URLs from storages that use AWS IAM role delegation stop working when the role session ends, one hour by default.
Browse a Connected Storage
list_storage_files lists every file under a path in one call. With recursive=False it returns one folder level per page instead, the same view as the File Explorer.
page_token = None
while True:
page = sdk.list_storage_files(storage_id, "my-bucket", "images/", recursive=False, page_token=page_token)
for folder in page["data"]["folders"]:
print("folder", folder)
for file in page["data"]["files"]:
print("file", file["path"])
page_token = page["data"]["nextPageToken"]
if page_token is None:
break
Pages hold at most page_size entries (1000 by default) and can hold fewer, even none, so stop only when nextPageToken is None. Pass get_signed_urls=True to get a download url with each file.
Send a Notification
Notifications are delivered to members of your organization and appear in their Notifications panel. The API key's user must be an organization admin.
# Plain notification
sdk.send_notification(
receivers=['labeler@example.com'],
message='The new task batch is ready for labeling.',
title='New Batch'
)
# Notification with a link attached
sdk.send_notification(
receivers=['labeler@example.com'],
message='The new task batch is ready for labeling.',
clickable_link=f'https://imerit.ango.ai/projects/{project_id}'
)
Limits enforced by the server:
receivers: 1 to 100 emails. Every receiver must be a member of your organization, otherwise the whole request is rejected.message: at most 1000 characters.title: at most 200 characters.clickable_link: an absolutehttp/httpsURL, at most 2048 characters.
Export Annotations
# Export annotations in COCO format
export_result = sdk.export(
project_id=project_id,
export_format='COCO'
)
# Download the export
import requests
response = requests.get(export_result['downloadUrl'])
with open('annotations.json', 'wb') as f:
f.write(response.content)
Release Process
Releases are created from master only and are triggered by pushing a vX.Y.Z tag. Using an annotated tag is the recommended release command.
- Update the shared package version in
imerit_ango/version.py. - Merge that version change into
master. - Create an annotated release tag:
git tag -a v1.4.1 -m "Release v1.4.1"
- Push the tag to GitHub:
git push origin v1.4.1
When a vX.Y.Z tag is pushed, GitHub Actions verifies that the tagged commit is in master history and that the tag matches the shared version in imerit_ango/version.py. It then builds both Python packages, publishes them to PyPI, and creates GitHub Release notes.
Versioning
The canonical version lives in imerit_ango/version.py as __version__. Both setup_ango.py and setup_imerit_ango.py read from this file, so updating one place is enough. The tag version (without the leading v) must match __version__ exactly or the workflow will fail.
Deployment and Releasing
One-time setup
Before the first automated release you need to configure PyPI trusted publishing and the GitHub environment:
-
Create a
pypienvironment in GitHub. Go to the repository Settings > Environments and create an environment namedpypi. This is required by the publish job for OIDC token generation. -
Configure PyPI trusted publishing for
ango. On pypi.org, go to theangoproject settings (or create the project if it does not exist yet) and add a trusted publisher with:- PyPI project name:
ango - Owner:
imerit-io - Repository name:
ango-sdk - Workflow filename:
release.yml - Environment name:
pypi
- PyPI project name:
-
Configure PyPI trusted publishing for
imerit-ango. Repeat the same steps for theimerit-angoproject on PyPI:- PyPI project name:
imerit-ango - Owner:
imerit-io - Repository name:
ango-sdk - Workflow filename:
release.yml - Environment name:
pypi
- PyPI project name:
After this setup, pushing a vX.Y.Z tag to master will automatically publish both packages and create a GitHub Release.
Release checklist
- Update
imerit_ango/version.pywith the new version number. - Merge the version change into
master. - Create and push an annotated tag:
git tag -a v1.4.1 -m "Release v1.4.1" git push origin v1.4.1
- Monitor the GitHub Actions run. If the workflow fails on version mismatch or master-ancestry checks, delete the tag, fix the issue, and re-tag:
git push origin :refs/tags/v1.4.1 # delete the remote tag git tag -d v1.4.1 # delete the local tag
- Once the workflow succeeds, both
angoandimerit-angowill be live on PyPI and a GitHub Release will appear on the repository.
Geofencing
If an organization has IP or country restrictions enabled, API calls from outside the allowlist fail with HTTP 451. The SDK raises that response body.
Support
- Documentation: https://docs.imerit.net
- Status Page: Ango Hub Status
- Customer Support: Available through your Ango Hub account
License
This SDK is provided by iMerit Technology Services for use with Ango Hub platform.
For the latest updates and detailed API reference, visit our complete documentation.
Metadata
Release files for imerit-ango 1.4.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imerit_ango-1.4.11.tar.gz | 42.5 kB | With provenance | Details for imerit_ango-1.4.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imerit_ango-1.4.11-py3-none-any.whl | Python 3 | none | any | Details for imerit_ango-1.4.11-py3-none-any.whl |
Total release size: 84.7 kB
Release files / imerit_ango-1.4.11.tar.gz
| Download URL | imerit_ango-1.4.11.tar.gz |
|---|---|
| Size | 42.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be1d53a55621ed8ead3d78bca788709d6cc38f30a90594961558737e713929ed
|
|
BLAKE2b-256 checksum How to use checksums |
8120ffc7fab0b0834b1d8e37a7b3eeeb3cb1af3a19c67d29141320747dd504f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / imerit_ango-1.4.11-py3-none-any.whl
| Download URL | imerit_ango-1.4.11-py3-none-any.whl |
|---|---|
| Size | 42.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ace5624f365bbd9ec0c5e256bb92b979542b4089d763e98fc819bc812c79bb6a
|
|
BLAKE2b-256 checksum How to use checksums |
e8d2c23e85a9d7aa4f6d8dc2a642d9db294d9cdcb693c0971e9f33594fe73b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for imerit-ango 1.4.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for imerit_ango-1.4.11.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.