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(...)orCxAPI(...)for grouped endpoints. Lower-level:stax_sdk.cx.Client/stax_sdk.ta.Client(sync) andAsyncClient(async). - Logging: Call
stax_sdk.configure_logging(); setLOG_FORMAT=jsonfor JSON logs to stdout.
Environment
STAX_MODULE_ID— set in StaxContext and available to your auth header helperSTAX_KEY— credentials; yourinject_headershelper reads this and sets request headersLOG_FORMAT—jsonfor JSON logs, otherwise human-readable
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89eba4eed78e9355f7d481399487065bcba9de0c00c71b1207772ab46db2c21b
|
|
| MD5 |
cf0f578c305d5c00f53ce2e8dcf9c59b
|
|
| BLAKE2b-256 |
8ab97f8047394af3d83b5a305bad893794cccaebd2919b767bc97f8a30697772
|
Provenance
The following attestation bundles were made for stax_sdk-0.1.0.tar.gz:
Publisher:
deploy.yml on stax-ai/stax-sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stax_sdk-0.1.0.tar.gz -
Subject digest:
89eba4eed78e9355f7d481399487065bcba9de0c00c71b1207772ab46db2c21b - Sigstore transparency entry: 1004149675
- Sigstore integration time:
-
Permalink:
stax-ai/stax-sdk-py@980139ec639c544f6d4844bf505dd244df3bcc58 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stax-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@980139ec639c544f6d4844bf505dd244df3bcc58 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb8ae5b441e265e5d3c52aba490acad8d006026fde45f5dd24391c48cc3dcb8
|
|
| MD5 |
500b9c6bc78abf50f8aec1601ea357f4
|
|
| BLAKE2b-256 |
c4709e3ad2797b47de384d48441efc0d20d4c1a2b1986c8eada9f8c42c4c841f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stax_sdk-0.1.0-py3-none-any.whl -
Subject digest:
6cb8ae5b441e265e5d3c52aba490acad8d006026fde45f5dd24391c48cc3dcb8 - Sigstore transparency entry: 1004149684
- Sigstore integration time:
-
Permalink:
stax-ai/stax-sdk-py@980139ec639c544f6d4844bf505dd244df3bcc58 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stax-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@980139ec639c544f6d4844bf505dd244df3bcc58 -
Trigger Event:
workflow_dispatch
-
Statement type: