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.4.0.tar.gz (164.8 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.4.0-py3-none-any.whl (493.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scalix_sdk-1.4.0.tar.gz
  • Upload date:
  • Size: 164.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scalix_sdk-1.4.0.tar.gz
Algorithm Hash digest
SHA256 8d6e504281ae3ce9cf20946a4106e8a0585f3bec98cf7c47e7c6f638e782a03a
MD5 b1f2cb1b2e12edc4165b2243bee222f9
BLAKE2b-256 ebe26be72c1752912bdcdfacd83e0d6aade933f20d0533ca3a0cec0a26076aad

See more details on using hashes here.

Provenance

The following attestation bundles were made for scalix_sdk-1.4.0.tar.gz:

Publisher: release.yml on scalixworld/scalix-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: scalix_sdk-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 493.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scalix_sdk-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f06af7b1887ae9cb547a5252e4334c66e169410faf71095490e16cd72d3d89d
MD5 6c54edc409d78b5c5c47673d2ab9a0cd
BLAKE2b-256 c7e090522682ca3257a0cc4f9d5726858e57c147af5cab9c3e18463b5ff3791c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scalix_sdk-1.4.0-py3-none-any.whl:

Publisher: release.yml on scalixworld/scalix-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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