Skip to main content
The Python SDK requires Python 3.9+.

Installation

Quick Start

Create an Account

The signup function creates a new Avala account and returns an API key. It does not require authentication.
An async variant is also available:

Authentication

The SDK authenticates using your Avala API key, which is sent via the X-Avala-Api-Key header on every request. You can provide the key directly or let the SDK read it from the environment. Option 1: Pass the key directly
Option 2: Use an environment variable

Async Support

The SDK ships with a fully async client built on top of httpx. Use AsyncClient for non-blocking I/O in async applications.
Using the async context manager:

Working with Datasets

Upload local files with client.datasets.create_from_local() or the avala datasets upload CLI command. See Upload local files for the managed-upload flow and server-reported owner allowance.

List Datasets

Get a Dataset

Upload local files

create_from_local() uploads a file or directory tree to Avala-managed storage, completes the upload batch, and creates a private dataset. It uses the API-selected POST, PUT, or multipart transfer mode. You do not need AWS credentials or a customer storage configuration.
The quota query is advisory; the API admits each upload against the owner’s current allowance. Usage includes in-flight reservations. The configured default organization allowance is 100 GiB, but the returned limit governs your owner. File limits depend on the returned transfer mode and admission checks, rather than a universal 2 GiB cap. Resume is enabled by default. Keep the original source files and local upload checkpoints, then rerun with the same owner after an interruption. wait=True waits for indexing after dataset creation; omit it to return before indexing finishes. The wait_timeout default is 3600 seconds. For files already in your own bucket, use the separate cloud importer.

Working with Projects

List Projects

Get a Project

Working with Tasks

List Tasks

Get a Task

Working with Exports

The Python SDK supports full CRUD operations for agents, webhooks, storage configurations, inference providers, quality targets, consensus config, and organizations. Datasets support local upload through create_from_local() and the avala datasets upload CLI command. Projects remain read-only; use the REST API for project mutations.

Create an Export

Poll for Completion

Working with Organizations

List Organizations

Create an Organization

Manage Members

Working with Slices

List Slices

Browsing Dataset Items

List Items in a Dataset

List Sequences

Get a Sequence

Validating a Dataset After Ingest

The SDK ships typed helpers for post-ingest validation — useful for scripts or AI agents that need to verify an upload without opening Mission Control.

Dataset Health

Inspect a Single Frame

Read Calibration

Type Hints

The SDK is fully typed. All response objects are Pydantic models with complete type annotations, giving you autocomplete and type checking out of the box.

Error Handling

The SDK raises typed exceptions so you can handle different failure modes precisely.

Polling with datasets.wait()

After uploading a dataset, use wait() to block until it finishes processing:
wait() polls the dataset status at the specified interval. If the dataset does not reach the target status before the timeout, it raises TimeoutError. An async variant is also available:

Pagination

List methods return a CursorPage object. You can iterate through items directly or control pagination manually.

Fleet Management

Fleet Management is in preview. APIs described here may change.
The fleet namespace provides access to device registry, recordings, events, rules, and alerts.
See the Fleet Dashboard guide for complete examples.

Configuration

You can customize the client behavior at initialization time.