Skip to main content

Add your description here

Project description

stax-sdk

SDK for Stax.ai APIs: automations (Knative Functions), CX/TA API clients, and logging.

This project uses uv for dependency management and running.

Setup

uv sync

For code generation (OpenAPI → client code). TA and CX clients are generated into src/stax_sdk/ta/_generated/ and src/stax_sdk/cx/_generated/ (no nested pyproject.toml). Typed group classes are then generated for both.

uv sync --all-extras
uv run python scripts/generate_clients.py

Usage

Grouped API (recommended): Use TaAPI / CxAPI for sync and AsyncTaAPI / AsyncCxAPI for async.

from stax_sdk import TaAPI, AsyncTaAPI, CxAPI, AsyncCxAPI

# Sync TA
ta = TaAPI(inject_headers=my_inject_headers)
ta.tpa.account_create(body=...)
ta.stack.list()

# Async TA
async_ta = AsyncTaAPI(inject_headers=my_inject_headers)
await async_ta.tpa.account_create(body=...)

# Sync CX
cx = CxAPI(inject_headers=my_inject_headers)
cx.misc.update_changelog(body=...)

# Async CX
async_cx = AsyncCxAPI(inject_headers=my_inject_headers)
await async_cx.misc.update_changelog(body=...)
  • Automations: Use @stax_automation(EventDataModel) or @stax_automation_async(EventDataModel); the decorated handler receives (event_data, StaxContext) and returns an ASGI callable for Knative func-python.
  • CX/TA clients: Use TaAPI(...) or CxAPI(...) for grouped endpoints. Lower-level: stax_sdk.cx.Client / stax_sdk.ta.Client (sync) and AsyncClient (async).
  • Logging: Call stax_sdk.configure_logging(); set LOG_FORMAT=json for JSON logs to stdout.

Environment

  • STAX_MODULE_ID — set in StaxContext and available to your auth header helper
  • STAX_KEY — credentials; your inject_headers helper reads this and sets request headers
  • LOG_FORMATjson for JSON logs, otherwise human-readable

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

stax_sdk-0.1.0.tar.gz (565.3 kB view details)

Uploaded Source

Built Distribution

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

stax_sdk-0.1.0-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file stax_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: stax_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 565.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stax_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89eba4eed78e9355f7d481399487065bcba9de0c00c71b1207772ab46db2c21b
MD5 cf0f578c305d5c00f53ce2e8dcf9c59b
BLAKE2b-256 8ab97f8047394af3d83b5a305bad893794cccaebd2919b767bc97f8a30697772

See more details on using hashes here.

Provenance

The following attestation bundles were made for stax_sdk-0.1.0.tar.gz:

Publisher: deploy.yml on stax-ai/stax-sdk-py

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

File details

Details for the file stax_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stax_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stax_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cb8ae5b441e265e5d3c52aba490acad8d006026fde45f5dd24391c48cc3dcb8
MD5 500b9c6bc78abf50f8aec1601ea357f4
BLAKE2b-256 c4709e3ad2797b47de384d48441efc0d20d4c1a2b1986c8eada9f8c42c4c841f

See more details on using hashes here.

Provenance

The following attestation bundles were made for stax_sdk-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on stax-ai/stax-sdk-py

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