Python SDK
The official Python SDK for Kadaikodi provides async, fully typed access to the GraphQL API.
Install
pip install kadaikodi-sdk
# Development install
pip install -e ".[dev]"
Quick start
import asyncio
from kadaikodi_sdk import KadaikodiSDK
async def main():
# Defaults to production gateways and the burdenoff_cli_kadaikodi OIDC client
sdk = KadaikodiSDK()
# Sign in with email/password
await sdk.auth.sign_in(email="[email protected]", password="secret")
# Kadaikodi-domain operations are nested under sdk.kadaikodi
providers = await sdk.kadaikodi.providers.list()
orders = await sdk.kadaikodi.orders.list()
# Shared cross-product modules are mounted at the top level
tags = await sdk.tags.list()
await sdk.close()
asyncio.run(main())
Nested namespace
Per the platform mandate, every module surface is nested under its owning module:
await sdk.kadaikodi.providers.list()
await sdk.kadaikodi.workers.list()
await sdk.kadaikodi.tasks.list()
await sdk.kadaikodi.offerings.list()
await sdk.kadaikodi.orders.list()
await sdk.kadaikodi.reviews.list()
await sdk.kadaikodi.investments.list()
await sdk.kadaikodi.analytics.health()
Modules
All methods are async. The following modules are mounted on the KadaikodiSDK instance:
auth, billing, channels, conversations, devportal, export, files, groups, health, integrations, kadaikodi, notifications, organizations, products, rbac, sandbox, scheduler, security, store, support, tags, tours, workspaces.
Configuration
from kadaikodi_sdk import KadaikodiSDK
sdk = KadaikodiSDK(
workspace_endpoint="https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
global_endpoint="https://graphql.burdenoff.com/global/graphql",
client_id="burdenoff_cli_kadaikodi", # default
oidc_issuer=None,
api_key=None,
access_token=None,
refresh_token=None,
workspace_token=None,
timeout=30.0,
auto_refresh=True,
)
Error handling
from kadaikodi_sdk import (
KadaikodiError,
AuthenticationError,
AuthorizationError,
NetworkError,
ValidationError,
RateLimitError,
)
try:
await sdk.auth.sign_in(email="[email protected]", password="wrong")
except AuthenticationError:
print("Invalid credentials")
except NetworkError:
print("Could not reach the API")
except KadaikodiError as e:
print(f"SDK error: {e}")
Environment selection
The SDK defaults to production endpoints. Override via constructor arguments or BURDENOFF_ENV. See Environment Selection.
Development
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
make format # black + isort
make lint # flake8
make type-check # mypy (strict)
make test # pytest
make sanity # format-check + lint + type-check + test (cov>=80) + build
Repository: github.com/algoshred/kadaikodi-sdk-python