Combined
Get started

Python SDK

Query granted context through the typed HTTPX client.

Install the package from the private registry configured for your organization:

python -m pip install combined-context

Set COMBINED_TOKEN, COMBINED_API_URL, and COMBINED_ACCOUNT_ID, then use the client as a context manager so its connection pool closes deterministically.

import os

from combined_context import ContextOS

account_id = os.environ["COMBINED_ACCOUNT_ID"]

with ContextOS() as context:
    sources = context.catalog.list(account_id)
    result = context.sql.query(
        account_id,
        """select application, count(*) as events
           from desktop_capture_ab12cd34.context.application_activity
           group by 1 order by 2 desc limit 20""",
    )

print({"sources": len(sources), "rows": result["rows"], "receipt": result["receiptId"]})

Pass RequestOptions(idempotency_key="...") to a mutation when retrying a known request. The SDK never receives S3, DuckLake, Supabase service-role, or provider credentials.

Use the Python SDK reference for client options, errors, lifecycle, pagination, and the complete resource map.