Skip to main content

Python SDK for Airia API

Project description

Airia Python API Library

PyPI version Python versions License

The Airia Python library provides a clean and intuitive interface to interact with Airia API. The library offers both synchronous and asynchronous clients for maximum flexibility in your applications.

Features

  • Dual Client Support: Choose between synchronous (AiriaClient) and asynchronous (AiriaAsyncClient) implementations
  • Pipeline Execution: Easily run AI pipelines with customizable parameters
  • Gateway Support: Seamlessly integrate with OpenAI and Anthropic services through Airia gateways
  • Error Handling: Comprehensive error handling with custom exceptions
  • Logging: Built-in configurable logging with correlation ID support for request tracing
  • Flexible Authentication: Support for both API keys and bearer tokens with flexible configuration

Documentation and Quick Start Guides

Full documentation and quick start guides are available here.

You can also run the documentation page locally with mkdocs:

  1. Install development dependencies
  2. Run mkdocs serve to start the local server

Installation

You can install the package using pip or uv:

pip uv
pip install airia
uv add airia

Install with optional dependencies

The package supports optional dependencies for gateway functionality:

OpenAI Gateway Anthropic Gateway All Gateways
pip install "airia[openai]"
pip install "airia[anthropic]"
pip install "airia[all]"

Install with development dependencies

Clone the repository:

git clone https://github.com/AiriaLLC/airia-python.git
cd airia-python

Then, run one of the following commands:

pip uv
pip install dependency-groups
dev=$(python -m dependency_groups dev)
pip install -e .
pip install $dev
uv sync --frozen --group dev

Building from Source

First make sure you have already cloned the repository, then run one of the following commands:

pip uv
pip install build
python -m build
uv build

This will create both wheel and source distribution in the dist/ directory.

Requirements

  • Python 3.9 or higher

  • Core dependencies:

    • requests
    • aiohttp
    • pydantic
  • Optional dependencies:

    • OpenAI gateway: openai>=1.74.0
    • Anthropic gateway: anthropic>=0.49.0

Features

  • Synchronous and Asynchronous Clients: Choose between sync (AiriaClient) or async (AiriaAsyncClient) based on your needs
  • Colored Logging: Built-in colored console logging using ANSI codes (no additional dependencies)
  • Correlation ID Tracking: Automatic request tracing with correlation IDs
  • Gateway Support: Optional OpenAI and Anthropic gateway integration
  • Type Safety: Full type hints and Pydantic models for request/response validation

Development

To run tests (make sure you have development dependencies installed):

pytest

For testing gateway functionality, install the optional dependencies:

# For OpenAI gateway tests
pip install -e .[openai]
pytest tests/test_openai_gateway.py

# For Anthropic gateway tests
pip install -e .[anthropic]
pytest tests/test_anthropic_gateway.py

# For all tests
pip install -e .[all]
pytest

Project details


Download files

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

Source Distribution

airia-0.1.41.tar.gz (94.5 kB view details)

Uploaded Source

Built Distribution

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

airia-0.1.41-py3-none-any.whl (161.2 kB view details)

Uploaded Python 3

File details

Details for the file airia-0.1.41.tar.gz.

File metadata

  • Download URL: airia-0.1.41.tar.gz
  • Upload date:
  • Size: 94.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airia-0.1.41.tar.gz
Algorithm Hash digest
SHA256 80f386af5f777689f0c58a43e3a0ce74955de23ab1800e432fe5f3255e8e1edf
MD5 176fa1e3cde0c6d252bb2e9970ea44e7
BLAKE2b-256 8e296b500e747740c9898d010d15fbe0f8e6d5fd76498d4b9d876aaa2023db95

See more details on using hashes here.

File details

Details for the file airia-0.1.41-py3-none-any.whl.

File metadata

  • Download URL: airia-0.1.41-py3-none-any.whl
  • Upload date:
  • Size: 161.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airia-0.1.41-py3-none-any.whl
Algorithm Hash digest
SHA256 cf42526a407c5ebd08ab42baa1b751cb43a13a9304873c0232d899e6de8bb99e
MD5 b9fb5db5f183b83f09aa3e5072b06e31
BLAKE2b-256 506512ba2ff336f1b4a08baa89c88dffda1f3875cc6e37b5d1b6f9601933e5c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page