Skip to content

Python SDK: Installation

pip install aires

The package ships as a prebuilt wheel for common platforms (Linux x86_64, macOS arm64/x86_64). The wheel contains a native extension compiled from Rust via PyO3 — no Rust toolchain is needed for installation.

python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# .venv\Scripts\activate   # Windows

pip install aires
poetry add aires
uv add aires

If no prebuilt wheel is available for your platform, or you want to build from the monorepo source:

  • Python 3.9+
  • Rust 1.75+ (rustup recommended)
  • protoc (Protobuf compiler)
  • maturin (Python-Rust build tool)
pip install maturin

From the packages/sdk-python directory:

# Development build (faster, unoptimized)
maturin develop

# Release build (optimized)
maturin develop --release

# Build a wheel for distribution
maturin build --release

The maturin develop command compiles the Rust code and installs the resulting native extension into your active Python environment.

packages/sdk-python/
├── Cargo.toml          # Rust crate config (PyO3 dependency)
├── pyproject.toml      # Python package config
└── src/
    └── lib.rs          # PyO3 bindings wrapping aires-sdk

The Python SDK is a thin binding layer. The lib.rs file:

  1. Imports aires_sdk::Aires (the Rust core)
  2. Exposes init(), trace(), debug(), info(), warn(), error(), fatal(), and metric() as Python functions
  3. Uses a static OnceLock<Aires> for the global instance
import aires

aires.init("my-service", "http://localhost:4317")
aires.info("hello from python")
print("aires installed successfully")
PlatformArchitectureStatus
Linuxx86_64Prebuilt wheel
Linuxaarch64Prebuilt wheel
macOSarm64 (Apple Silicon)Prebuilt wheel
macOSx86_64 (Intel)Prebuilt wheel
Windowsx86_64Build from source
  • Usage — Logging, metrics, and all SDK functions