Python runtime for rspyts: pydantic contracts and a ctypes loader for Rust cdylibs bridged with the rspyts ABI.
Project description
rspyts (Python runtime)
The Python runtime for rspyts: define types, functions, and classes once in Rust, and rspyts generate emits a typed Python package — pydantic v2 models, exception hierarchies, handle classes — that calls the compiled Rust cdylib through a small C ABI.
This package is what that generated code imports: the Contract pydantic base, the BridgeError exception family, and the Library loader/caller. It contains no generated code, and is useful on its own only as a dependency of generated packages.
Python 3.11 through 3.14 is supported.
Installing
pip install rspyts
Note that numpy and pydantic v2 are the only dependencies, and that the package is pure Python — there is no compiled extension module.
Public API
Contractis the unknown-field-rejecting pydantic base used by generated models.Librarylocates and calls the Rustcdylib.BridgeError,RspytsPanicError, andStaleHandleErrorare the runtime exception hierarchy.BridgeErrorRegistryis the call-scoped error map used by generated wrappers;register_errorremains an optional process-wide fallback for handwritten code.I64/U64and their*_to_wire/*_from_wirehelpers preserve exact 64-bit values as Pythonintwhile generated code uses canonical decimal strings on the wire.JsonValueand the JSON helpers preserve schemaless values without confusing attachment-shaped user objects with protocol markers.
Applications normally import their generated package rather than calling Library directly.
Documentation
Documentation can be found in the repository: the Python guide, and the normative specs under docs/design.
License
This project is licensed under the MIT license.
Project details
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 rspyts-0.2.0.tar.gz.
File metadata
- Download URL: rspyts-0.2.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f61dc242b621cc007ed0fa89e5eb420a010c3500e6fe9294fa506d72284c707
|
|
| MD5 |
a9a0fd07f97200cd69e2c9bec396db92
|
|
| BLAKE2b-256 |
c5e007cd2088574ef5d5d52455c076fd3811044de2ccf9d1e399eabc90ca9204
|
Provenance
The following attestation bundles were made for rspyts-0.2.0.tar.gz:
Publisher:
deploy.yml on 2xf-org/rspyts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rspyts-0.2.0.tar.gz -
Subject digest:
2f61dc242b621cc007ed0fa89e5eb420a010c3500e6fe9294fa506d72284c707 - Sigstore transparency entry: 2166933221
- Sigstore integration time:
-
Permalink:
2xf-org/rspyts@e6125cfc5a49aa7f7f5357e611077239b5108c81 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/2xf-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@e6125cfc5a49aa7f7f5357e611077239b5108c81 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rspyts-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rspyts-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2b03d0695ccd6f15d49beaeca1ffe814efbb65c14d4d8e5a3c7e99a6c259a54
|
|
| MD5 |
2d54e2c3d6c6bfd94cd7bfbdc8dcf72b
|
|
| BLAKE2b-256 |
f5d0ab154bfe0f8dee6d77065e5c6a92144d0bab53f51c3c25970827619cf550
|
Provenance
The following attestation bundles were made for rspyts-0.2.0-py3-none-any.whl:
Publisher:
deploy.yml on 2xf-org/rspyts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rspyts-0.2.0-py3-none-any.whl -
Subject digest:
a2b03d0695ccd6f15d49beaeca1ffe814efbb65c14d4d8e5a3c7e99a6c259a54 - Sigstore transparency entry: 2166933224
- Sigstore integration time:
-
Permalink:
2xf-org/rspyts@e6125cfc5a49aa7f7f5357e611077239b5108c81 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/2xf-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@e6125cfc5a49aa7f7f5357e611077239b5108c81 -
Trigger Event:
workflow_dispatch
-
Statement type: