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.4.tar.gz (147.9 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.4-py3-none-any.whl (428.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scalix_sdk-1.3.4.tar.gz
  • Upload date:
  • Size: 147.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scalix_sdk-1.3.4.tar.gz
Algorithm Hash digest
SHA256 b6fa60cc693dc35221ae0779b0ce6b8d12d0dbbbdcc845c582cd9eadb188304d
MD5 b3affb67729443a15859c074f87374ee
BLAKE2b-256 f45b2b437ced9f26042096a9af80fd6163a71b21d65853dbcf6826ffa32a40dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for scalix_sdk-1.3.4.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.3.4-py3-none-any.whl.

File metadata

  • Download URL: scalix_sdk-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 428.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scalix_sdk-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 146c2216e5bbb1174e16118c550afd8efe59c626a59a9e52b6eca9211e056ed6
MD5 f8a98adbc112649f28e5133fff814874
BLAKE2b-256 529b060e4499de5b0478110baed1c0c3688be39fbd973d0af150e260d9d2d279

See more details on using hashes here.

Provenance

The following attestation bundles were made for scalix_sdk-1.3.4-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