Python SDK Overview
The Qarion Python SDK (qarion-sdk) is the official client library for the Qarion Lightweight AI and Data Governance platform. It provides a clean, typed interface around the Qarion REST API so you can manage data products, quality checks, connectors, issues, and alerts from Python code.
Key Features
- Async and Sync clients — choose
QarionClientfor asynchronous workflows orQarionSyncClientfor scripts and notebooks. Both expose identical resource accessors. - Typed models — all API responses are parsed into Pydantic models, giving you autocomplete and validation out of the box.
- Automatic retries — transient failures are retried automatically (configurable).
- Context-manager lifecycle — open and close HTTP connections cleanly with
async with/with. - Comprehensive exception hierarchy — every HTTP error maps to a typed exception you can catch explicitly.
Architecture
The client instantiates a shared HTTP transport and exposes resource accessors — lightweight objects that group related API calls. Every resource is available in both async and sync variants, keeping the interface consistent regardless of your runtime.
Quick Example
import asyncio
from qarion import QarionClient
async def main():
async with QarionClient(api_key="qk_...") as client:
spaces = await client.spaces.list()
products = await client.products.list("my-space")
result = await client.quality.trigger("my-space", "row-count-check")
print(f"Check passed: {result.is_passed}")
asyncio.run(main())
Or synchronously:
from qarion import QarionSyncClient
with QarionSyncClient(api_key="qk_...") as client:
spaces = client.spaces.list()
products = client.products.list("my-space")
Both clients expose the same methods — the sync variant simply drops
awaitand useswithinstead ofasync with.
Available Resources
| Accessor | Description |
|---|---|
client.products | Data products CRUD, refreshes, and lineage |
client.quality | Quality checks, executions, and external results |
client.connectors | Connector management and metadata sync |
client.spaces | Spaces listing and membership |
client.issues | Issue tracking and ticket management |
client.alerts | Central alerts feed and product banner alerts |
client.search | Multi-entity search across spaces and organizations |
Next Steps
- Installation & Configuration — install the package and configure your credentials.
- Error Handling — understand the exception hierarchy.
- Data Models — explore the typed response models.