Skip to main content

The official client for Scalix Cloud — one token for AI inference, database, functions, storage, KV, auth, and every platform service. Generated from the OpenAPI spec.

Project description

Scalix SDK — Python

The official Python client for Scalix Cloud — one API key for AI inference, database, functions, storage, KV, auth, registry, and every platform service.

This client is generated from the OpenAPI spec (sdk/openapi.json, produced from the gateway's utoipa annotations) via openapi-python-client (attrs + httpx). Do not hand-edit scalix_sdk/generated/.

Installation

pip install scalix-sdk

Get an API key from the Scalix console (sign up at console.scalix.world). Full guides live at docs.scalix.world.

Usage

Operations are grouped by tag under scalix_sdk.generated.api.<tag>; each has sync / sync_detailed / asyncio callables:

from scalix_sdk import AuthenticatedClient
from scalix_sdk.generated.api.account import get_me  # see generated/api/ for all tags

client = AuthenticatedClient(base_url="https://api.scalix.world", token="scalix_sk_...")
me = get_me.sync(client=client)

Production-grade defaults (retry, idempotency, typed errors)

create_client() returns an AuthenticatedClient hardened with Stripe/OpenAI-style defaults, without changing the generated core:

  • Automatic retry with exponential backoff + jitter on 429/5xx, honoring the Retry-After header.
  • Idempotency-Key on every write (POST/PUT/PATCH), stable across retries — safe replays for billing/provisioning calls.
  • SDK-version User-Agent (scalix-python/<version>).
  • Typed errors raised by defaultAuthenticationError, RateLimitError, InvalidRequestError, NotFoundError, ServerError, … (all subclass ScalixError), instead of the generic UnexpectedStatus.
from scalix_sdk import create_client, RateLimitError
from scalix_sdk.generated.api.database import execute_sql
from scalix_sdk.generated.models import SqlRequest

client = create_client(token="scalix_sk_...", max_retries=3)

try:
    result = execute_sql.sync_detailed(client=client, body=SqlRequest(query="SELECT NOW()"))
except RateLimitError as err:
    print("rate limited; request id:", err.request_id)

create_client configures both the sync and async underlying clients, so asyncio / asyncio_detailed calls are hardened too. Pass raise_on_error=False to keep the raw generated behavior (documented error bodies returned, not raised).

Regenerating

After the API (OpenAPI spec) changes:

bash scripts/generate.sh

CI's SDK/CLI codegen drift-guard enforces that the committed client matches sdk/openapi.json.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scalix_sdk-1.3.3.tar.gz (147.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scalix_sdk-1.3.3-py3-none-any.whl (428.1 kB view details)

Uploaded Python 3

File details

Details for the file scalix_sdk-1.3.3.tar.gz.

File metadata

  • Download URL: scalix_sdk-1.3.3.tar.gz
  • Upload date:
  • Size: 147.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for scalix_sdk-1.3.3.tar.gz
Algorithm Hash digest
SHA256 473911a462ed81dda8ffdd905d58841fe8278aa9dfd2c46b8d37bcbf450623ac
MD5 1f22843c3b74d9cddedf7420df86a788
BLAKE2b-256 23f1c02ccd1d2ae74f92ebe2b7b01e174fbbb73c7951691e908216d59064c296

See more details on using hashes here.

File details

Details for the file scalix_sdk-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: scalix_sdk-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 428.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for scalix_sdk-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e69357e61aaaf4ef93f90120fbdc497f579c2ea6249aeb73de17329982ff85d
MD5 0cd86683c7fca813083940175a6f41a9
BLAKE2b-256 efb312a0540236fd1c1637fdcbb79dfd0d1e7ceb7da9c3d2b89bf9ab6d93ac06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page