Skip to main content

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={"all_workspaces": True, "workspace_assignments": [{"workspace_id": "sample"}]},
)

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).

Metadata

Release files for cadenya 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cadenya 1.8.0
File Size Uploaded Provenance Actions
cadenya-1.8.0.tar.gz 95.4 kB With provenance Details for cadenya-1.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cadenya 1.8.0
File Interpreter ABI Platform Actions
cadenya-1.8.0-py3-none-any.whl Python 3 none any Details for cadenya-1.8.0-py3-none-any.whl

Total release size: 210.8 kB

Release files / cadenya-1.8.0.tar.gz

Download URL cadenya-1.8.0.tar.gz
Size 95.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c336d7d07b8210e6ee99f0a4ff3dc6738f8bbf97a5d1e7cd823d56904d10827b
BLAKE2b-256 checksum
How to use checksums
6b00255b706eb3bde0f4613ac13220d1312b59e39c4e276e803e2d535013830e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / cadenya-1.8.0-py3-none-any.whl

Download URL cadenya-1.8.0-py3-none-any.whl
Size 115.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23978e4626b10b7b8cc3c53b5ddd2b52f628f957a33a55a7c4378ba93b702a91
BLAKE2b-256 checksum
How to use checksums
379825c268505d4e458730f79cca2d32d70355827ee95e8e3ce4091fc12aba75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for cadenya 1.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cadenya-1.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page