Skip to main content

tungsten-runtime (Python)

Runtime support for SDKs generated by Tungsten.

Install from source

From the repository root, with an interpreter satisfying requires-python in runtimes/python/pyproject.toml:

python -m pip install ./runtimes/python

For generated clients, set targets.python.runtime_path to this runtime checkout when using uv, or install the runtime and generated SDK explicitly. The package includes py.typed; generated models support Pydantic and models: dataclasses. See the root README for interpreter compatibility options. ClientCore is synchronous; AsyncClientCore uses asyncio.

Shared contract

Generated clients use the runtime for request validation, authentication, idempotency keys, confirmation previews, bounded retries, verification, pagination, macros and server-sent events where the input API declares them. Calls return a typed result or a diagnostic envelope describing recovery; unknown outcomes never justify blindly repeating a mutation. The API remains responsible for authorization and server-side idempotency.

Limits

Stream collect(max_bytes=..., max_ms=...) accepts optional byte and time budgets. Setting either defaults the other to 4 MiB or 60 seconds. The byte count uses UTF-8 JSON for the event values, excluding SSE framing. A limit closes the stream and returns a nonretryable error with only the admitted events as partial. Calling collect() with no arguments preserves unbounded collection.

Set ClientOptions.max_response_bytes to opt into an ordinary-response byte cap; a call option with the same name overrides it. The value must be a positive safe integer (at most 9007199254740991); unset keeps the existing unbounded behavior. Content-Length is checked before reading, and actual bytes are counted even without that header. Overflow closes the body and returns UNEXPECTED_RESPONSE with code RESPONSE_TOO_LARGE and retryable: never. A mutation may have taken effect: inspect API state before retrying. The cap does not limit a successful SSE stream; use its event and collection limits.

Default idempotency and OAuth token state are in memory. A FileIdempotencyStore is available for durable idempotency keys; it does not store OAuth tokens. Applications own persistence, permissions and lifecycle.

No runtime ships a file-backed OAuth token store. Provide an application-owned token-store implementation when tokens must survive process restarts; protect stored credentials and avoid logging them. Registry publication and package availability are separate from building this source checkout.

License

Apache-2.0; see the packaged LICENSE. The compiler is licensed separately under AGPL-3.0-only.

Metadata

Release files for tungsten-runtime 0.1.4

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

Source distribution (sdist)

Source distribution for tungsten-runtime 0.1.4
File Size Uploaded Provenance Actions
tungsten_runtime-0.1.4.tar.gz 118.5 kB With provenance Details for tungsten_runtime-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tungsten-runtime 0.1.4
File Interpreter ABI Platform Actions
tungsten_runtime-0.1.4-py3-none-any.whl Python 3 none any Details for tungsten_runtime-0.1.4-py3-none-any.whl

Total release size: 248.3 kB

Release files / tungsten_runtime-0.1.4.tar.gz

Download URL tungsten_runtime-0.1.4.tar.gz
Size 118.5 kB
Tags Source
SHA-256 checksum
How to use checksums
42ff86a247445ab81690ee0cdcce4540bf2b445f6ce59240724e4bf2e9621a47
BLAKE2b-256 checksum
How to use checksums
51e9e61139ef6e344ba486a307fc5c13511e642c0f63ec9c00a24dd821dc0f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / tungsten_runtime-0.1.4-py3-none-any.whl

Download URL tungsten_runtime-0.1.4-py3-none-any.whl
Size 129.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb60f38d0878fb899458d35a3e4b2e6f34a45042f7f45b6a1cc22fbdab70ccc9
BLAKE2b-256 checksum
How to use checksums
3716c93c1941ae0af8b67efb33b89a546a509105a2b4453eeb8baa2dc0d55a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Security for tungsten-runtime 0.1.4

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 tungsten_runtime-0.1.4.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 28, 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