Skip to main content

Python SDK Overview

The Qarion Python SDK (qarion-sdk) is the official client library for Qarion — The Data Control Pane for AI and data governance. 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 QarionClient for asynchronous workflows or QarionSyncClient for 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 await and uses with instead of async with.

Available Resources​

AccessorDescription
client.productsData products CRUD, refreshes, and lineage
client.qualityQuality checks, executions, and external results
client.connectorsConnector management and metadata sync
client.source_systemsSource system inventory, roles, and credentials
client.spacesSpaces listing and membership
client.issuesIssue tracking and ticket management
client.alertsCentral alerts feed and product banner alerts
client.searchMulti-entity search across spaces and organizations
client.data_domainsData domains CRUD, steward management, and governance scorecards
client.glossaryBusiness glossary term management
client.lineageLineage edge management and cross-space dependencies
client.integrationsIntegration health dashboard, connector status, refresh registration, and external record issue sync

Next Steps​

  1. Installation & Configuration — install the package and configure your credentials.
  2. Error Handling — understand the exception hierarchy.
  3. Data Models — explore the typed response models.