spec2py-runtime
The runtime library behind clients generated by spec2py. Generated code only describes operations; everything that happens at request time lives here, so a fix arrives with a dependency upgrade instead of a regeneration.
| Area | Behaviour |
|---|---|
| Transport | httpx2, with pluggable transport= / http_client= for tests and custom stacks |
| Retries | Exponential backoff with jitter. Honours Retry-After, retry-after-ms and x-should-retry. Retries idempotent methods, and POSTs once an idempotency key is attached (generated automatically when the API declares an idempotency header). |
| Auth | ApiKeyAuth (header, query or cookie), BearerAuth, BasicAuth, OAuth2ClientCredentials (fetch, cache, refresh, retry on 401), MultiAuth, or any httpx2.Auth |
| Pagination | CursorPagination, OffsetPagination, PageNumberPagination, LinkHeaderPagination; Page / AsyncPage / AsyncPaginator iterate lazily and expose .data and .next_cursor |
| Streaming | SSE and NDJSON decoded into typed events (Stream, AsyncStream) |
| Uploads | Multipart from file objects, paths, bytes or (name, content, type) tuples |
| Errors | APIError → APIStatusError → NotFoundError, RateLimitError, ...; bodies parsed into declared models |
| Observability | Hooks(on_request=..., on_response=...) |
| Models | BaseModel with lenient parsing, Tolerant enums, lazy validator builds |
Requires Python 3.14.
Validation and compatibility
Responses reject missing required fields and invalid field values by default.
Unknown fields are retained and unknown enum values are tolerated. Set
strict_response_validation=False explicitly for best-effort parsing; its
results can contain raw values or missing attributes and need defensive handling.
Requests revalidate generated model instances, including nested instances.
The initial generator and generated clients require spec2py-runtime>=0.1.0,<0.2.0.
Within the 0.1 series, runtime patch releases preserve the generated-code API.
Breaking runtime changes require a new minor series and regeneration to adopt it.
When emission starts using a new runtime feature, raise the minimum patch version
in both the generator dependency and generated project metadata. Development
snapshots before 0.1.0 are not release candidates for this compatibility range.
Metadata
Release files for spec2py-runtime 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spec2py_runtime-0.1.0.tar.gz | 25.0 kB | Without provenance | Details for spec2py_runtime-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spec2py_runtime-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for spec2py_runtime-0.1.0-py3-none-any.whl |
Total release size: 54.0 kB
Release files / spec2py_runtime-0.1.0.tar.gz
| Download URL | spec2py_runtime-0.1.0.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aae130503b8feb8ad3c76a8569630081e3bd3f8ff27715d386c6d5e14b32e658
|
|
BLAKE2b-256 checksum How to use checksums |
2f30626fa497db8f0a265c38c683c4dcaa07197791d4f6166f563d2253b544b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spec2py_runtime-0.1.0-py3-none-any.whl
| Download URL | spec2py_runtime-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8f8ae78dfdc074921013d3ad3f646d65d3dcf360acf61ea129906289a49a33e
|
|
BLAKE2b-256 checksum How to use checksums |
69d485dcbb611f9025a1e2045297810e686b6204053bf187582714f7d996dabd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for spec2py-runtime 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.