Skip to main content

Ango Hub Python SDK

iMerit

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:

  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

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()
  • 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()
  • LLM: create_llm(), get_llms(), delete_llm()
  • Members: invite_members_to_org(), get_organization_members()
  • Permissions: update_organization_members_role()
  • Notifications: send_notification()

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,
)

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.

  1. Update the shared package version in imerit_ango/version.py.
  2. Merge that version change into master.
  3. Create an annotated release tag:
git tag -a v1.4.1 -m "Release v1.4.1"
  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:

  1. Create a pypi environment in GitHub. Go to the repository Settings > Environments and create an environment named pypi. This is required by the publish job for OIDC token generation.

  2. Configure PyPI trusted publishing for ango. On pypi.org, go to the ango project 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
  3. Configure PyPI trusted publishing for imerit-ango. Repeat the same steps for the imerit-ango project on PyPI:

    • PyPI project name: imerit-ango
    • Owner: imerit-io
    • Repository name: ango-sdk
    • Workflow filename: release.yml
    • Environment name: pypi

After this setup, pushing a vX.Y.Z tag to master will automatically publish both packages and create a GitHub Release.

Release checklist

  1. Update imerit_ango/version.py with the new version number.
  2. Merge the version change into master.
  3. Create and push an annotated tag:
    git tag -a v1.4.1 -m "Release v1.4.1"
    git push origin v1.4.1
    
  4. 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
    
  5. Once the workflow succeeds, both ango and imerit-ango will be live on PyPI and a GitHub Release will appear on the repository.

Support

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ango-1.4.8.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ango-1.4.8-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file ango-1.4.8.tar.gz.

File metadata

  • Download URL: ango-1.4.8.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ango-1.4.8.tar.gz
Algorithm Hash digest
SHA256 4bd5aa8f1ab3277ab6fcb4aacad7bf28216b001346ff287789e0b754373d3d84
MD5 2187a83eca29b047eb7c3eb3eec92aeb
BLAKE2b-256 a285b6a9d7ac78259f81d15389e54455ca300b2f561609265a4c7abee2d5cf68

See more details on using hashes here.

Provenance

The following attestation bundles were made for ango-1.4.8.tar.gz:

Publisher: release.yml on imerit-io/ango-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ango-1.4.8-py3-none-any.whl.

File metadata

  • Download URL: ango-1.4.8-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ango-1.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 75cea3a8cb1635ce86152cbd316785559fd95f277cacae3f26f595f55400531c
MD5 9ee426b5a12ac387c4c069ec2e62e8d1
BLAKE2b-256 df1db852e91ba8550e922d16a69554367ae520f62c602d0c0844a46ece83c160

See more details on using hashes here.

Provenance

The following attestation bundles were made for ango-1.4.8-py3-none-any.whl:

Publisher: release.yml on imerit-io/ango-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.4.8 This release

2 files

1.4.7

2 files

1.4.6

2 files

1.4.5

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

1 file

1.3.50

1 file

1.3.49

1 file

1.3.48

1 file

1.3.47

1 file

1.3.46

1 file

1.3.45

1 file

1.3.44

1 file

1.3.43

1 file

1.3.42

1 file

1.3.41

1 file

1.3.40

1 file

1.3.39

1 file

1.3.38

1 file

1.3.37

1 file

1.3.36

1 file

1.3.35

1 file

1.3.34

1 file

1.3.33

1 file

1.3.32

1 file

1.3.31

2 files

1.3.30

1 file

1.3.29

1 file

1.1.6

1 file

1.1.5

1 file

1.1.4

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.10

1 file

1.0.9

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.1.26

1 file

0.1.24

1 file

0.1.23

1 file

0.1.22

1 file

0.1.21

1 file

0.1.20

1 file

0.1.19

1 file

0.1.18

1 file

0.1.17.2

1 file

0.1.16

1 file

0.1.15

1 file

0.1.14

1 file

0.1.13

1 file

0.1.12

1 file

0.1.11

1 file

0.1.10.2

1 file

0.1.10

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3.1

1 file

0.1.3.0

1 file

0.1.2

1 file

0.1.1

1 file

0.0.34

1 file

0.0.33

1 file

0.0.30

1 file

0.0.28

1 file

0.0.27

1 file

0.0.26

1 file

0.0.24

1 file

0.0.23

1 file

0.0.22

1 file

0.0.21

1 file

0.0.20

1 file

0.0.19

1 file

0.0.18

1 file

0.0.17

1 file

0.0.16

1 file

0.0.15

1 file

0.0.14

1 file

0.0.13

1 file

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page