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

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.3
File Size Uploaded Provenance
tungsten_runtime-0.1.3.tar.gz 118.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 248.2 kB

Release files / tungsten_runtime-0.1.3.tar.gz

Download URL tungsten_runtime-0.1.3.tar.gz
Size 118.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9fd2f130c2d96d9e71c3175748eaab398551ab96a375416dd32fae4810ddc9b5
BLAKE2b-256 checksum
How to use checksums
02815ecfbd30ee08db04ade185eafb140462dd05897a9b522fd64ae0e96fa28c
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 19, 2026.

Transparency log

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

Download URL tungsten_runtime-0.1.3-py3-none-any.whl
Size 129.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cba61fcaf595b1a75d13ee2e2d60a037de3a6a513a2645b037d1d3079dff15b3
BLAKE2b-256 checksum
How to use checksums
ce3bdb097c517d36db82faa7546ce5a0cf652b1349450716fbe6c9faa2f7d5db
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 19, 2026.

Transparency log

Security for tungsten-runtime 0.1.3

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tungsten_runtime-0.1.3.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 19, 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.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files Full provenance

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