Cadenya Python SDK
The official Python client for the Cadenya API. Generated by redwood.
Built on httpx; typed with dataclass models, TypedDict request shapes, and
a py.typed marker.
Install
pip install cadenya
Getting started
from cadenya import Cadenya
# Reads CADENYA_API_KEY (and CADENYA_WORKSPACE_ID) from the environment when
# arguments are omitted. Explicit blank values raise ValueError and never
# fall back to the environment.
with Cadenya() as client:
result = client.accounts.retrieve()
Cadenya is a context manager; close() releases the internally owned
httpx client (a caller-supplied http_client is never closed).
Requests are snake_case throughout
Nested request objects take snake_case keys and are translated to wire names at the HTTP boundary. Wire-format keys also pass through for raw payloads; your own data inside JSON/map fields is never rewritten.
client.api_keys.create(
metadata={"name": "sample"},
spec={},
)
Errors
Non-2xx responses raise APIError (google.rpc Status: status_code,
code, message, details). Protocol surprises (unfollowed redirects,
non-JSON success bodies) raise APIResponseError; connection failures
raise APIConnectionError.
Retries
Automatic retries apply only to idempotent methods (GET/HEAD/PUT/DELETE) and default to 0; counts normalize to a bounded 0–10 integer. Streaming requests never auto-retry and their read timeout is unlimited (connect/ write/pool stay bounded).
Pagination
for item in client.api_keys.list():
... # iterating a page auto-fetches every page
Streaming (SSE)
Streams are context managers — early exits close the response deterministically:
with client.objectives.stream_events(objective_id) as stream:
for event in stream:
...
# Resume after a disconnect: the checkpoint persists per the SSE spec.
with client.objectives.stream_events(objective_id, last_event_id=stream.last_event_id) as resumed:
for event in resumed:
...
Webhooks (no API key required)
import os
from cadenya import unwrap_webhook
event = unwrap_webhook(payload, headers, secret=os.environ["CADENYA_WEBHOOK_SECRET"])
Verification follows Standard Webhooks (24–64 byte decoded secrets, integer timestamps, bounded tolerance).
Reference
The full method reference ships with the package as cadenya/api.md
(importlib.resources reads it; it is also in the repository).
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 cadenya-1.0.0.tar.gz.
File metadata
- Download URL: cadenya-1.0.0.tar.gz
- Upload date:
- Size: 74.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e3602f58a2f29e02978adbb448f3eca768ede4eaa7a817007f574b76e53550a
|
|
| MD5 |
ed980ef56769bc59f0eefd7913e9a92c
|
|
| BLAKE2b-256 |
16c560ef21c1395d7a98982efb8c6b20a70c5d35d880589f6f2a68c13901c0f1
|
Provenance
The following attestation bundles were made for cadenya-1.0.0.tar.gz:
Publisher:
publish-pypi.yml on cadenya/cadenya-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cadenya-1.0.0.tar.gz -
Subject digest:
7e3602f58a2f29e02978adbb448f3eca768ede4eaa7a817007f574b76e53550a - Sigstore transparency entry: 2472331183
- Sigstore integration time:
-
Permalink:
cadenya/cadenya-python@b6c952101198d8dfe044dcec57699281cd2be06d -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/cadenya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b6c952101198d8dfe044dcec57699281cd2be06d -
Trigger Event:
release
-
Statement type:
File details
Details for the file cadenya-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cadenya-1.0.0-py3-none-any.whl
- Upload date:
- Size: 93.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526c1018df64c10721b9395c9ce5e788b34e40e459b1ad6e2d0b3793a58086e7
|
|
| MD5 |
1aabc0826871f133743ff8afeec61f54
|
|
| BLAKE2b-256 |
bbbf42af05cee09d0036ba169e4ffbc1130185bfe252159a3793ff12f9197a23
|
Provenance
The following attestation bundles were made for cadenya-1.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on cadenya/cadenya-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cadenya-1.0.0-py3-none-any.whl -
Subject digest:
526c1018df64c10721b9395c9ce5e788b34e40e459b1ad6e2d0b3793a58086e7 - Sigstore transparency entry: 2472331213
- Sigstore integration time:
-
Permalink:
cadenya/cadenya-python@b6c952101198d8dfe044dcec57699281cd2be06d -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/cadenya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b6c952101198d8dfe044dcec57699281cd2be06d -
Trigger Event:
release
-
Statement type: