Skip to main content
The Python SDK wraps the AiQL API for Python 3.10 and later.

Prerequisites

  • Python 3.10 or later
  • An AiQL API key from the Dashboard

Install

Authenticate

Create a client with your API key. Read the key from an environment variable instead of hardcoding it.
To target a different environment, set the base URL. Pass workspace_id on the client to send it as the AiQL-Workspace header on every workspace-scoped call.

Workspaces

Ingestions

Queries

Sources

Tools

Error handling

The SDK raises AiqlError for failed requests. Inspect status_code and detail to handle specific cases.