Skip to main content

Python SDK

The Python SDK provides a complete toolkit for integrating Adaline’s LLM deployment and observability features into your AI applications. The SDK is fully async and uses asyncio throughout.

Installation

pip

Quick Start

Type Definitions

The SDK uses types from the adaline_api package:

Resource management

Beyond deployments and monitoring, Adaline exposes seven namespace clients that cover the platform’s full REST surface. Each method is async, retries 5xx responses, aborts on 4xx, and uses keyword-only arguments:
See the per-client pages for full method lists: Need the same retry behavior on a raw call? Use the exported with_retry helper:

Error Handling

The SDK uses automatic retry logic with exponential backoff for API calls:
  • 5xx errors: Automatically retried with exponential backoff (1s, 2s, 4s, … capped at 10s) within a 20s budget
  • 4xx errors: Fail immediately (no retry)
Failed flush entries are dropped and counted via monitor.dropped_count. Successfully sent entries are tracked via monitor.sent_count.

Real-World Example: RAG Pipeline

API Reference

Adaline Class

Core client for deployments and monitoring.

Monitor Class

Buffered log submission with automatic flushing.

Trace Class

High-level operation tracking.

Span Class

Granular operation tracking with content types.