Generated Python types export
Generated from proto/ via JSON Schema. Do not edit by hand —
regenerate with scripts/gen-sdk-types.sh and commit the result (CI drift-gates it).
A types export, not a full SDK: Pydantic models + registered vocabulary constants. Transport (Connect), request signing (RFC 9421), and key management are a separate, hand-written SDK layer.
Contents:
wire/base.py—WireModel, the single base class every model extends (the one seam: SDK-wide config + your override point; neutral name so a protocol rename never touches consumer imports). Hand-written, not regenerated.wire/models.py— Pydantic v2 models for every message (License,Pricing,LicenseTerm,Offer, …), all extendingWireModel. They carry shape + per-field validation: enums (named from the proto descriptor,*_UNSPECIFIEDdropped), string patterns, length/item bounds. Nested messages reference the same model (LicenseTerm.licenseis aLicense), so the whole tree hydrates as typed models. Cross-field rules are NOT here — enforced server-side by the Exchange/Broker.vocab/— registered vocabulary constants per axis (pricingunits, …) withis_registered(), plus the accepted aliases authored beside the tokens (ALIASES,canonical()— an exact lookup; the SDK folds case before it looks up).
from wire.models import LicenseTerm, License
from wire.base import WireModel # subclass this to customize ALL models at once
term = LicenseTerm.model_validate(incoming_json) # raises on shape/per-field violations
assert isinstance(term.license, License) # full nested hierarchy, typed
Install (from this directory): pip install .
Import names and PyPI
The distribution is published on PyPI as fora-protocol. Its import packages are the
generic top-level names wire and vocab, so it can collide with any other distribution
that owns either name; install it into an environment that does not. This is a deliberate
tradeoff: a rename to a namespaced package would break every consumer that installs from
this repository by git ref, so the names stay as they are.
pip install fora-protocol
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 fora_protocol-1.0.4.tar.gz.
File metadata
- Download URL: fora_protocol-1.0.4.tar.gz
- Upload date:
- Size: 64.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea2a9728fe546d5cf1c8a8660a82c8471bd780cfd0aa7ad64002e74f15a34b3
|
|
| MD5 |
7c1745d3f27294ffb6fdfb9ce091c155
|
|
| BLAKE2b-256 |
ce556d2569ee894475c37a7c1ffed0cd4b5a150333f464310b8a2bcadf3c854f
|
File details
Details for the file fora_protocol-1.0.4-py3-none-any.whl.
File metadata
- Download URL: fora_protocol-1.0.4-py3-none-any.whl
- Upload date:
- Size: 59.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52883bb1cd9ad8a42757bf14b95ead48f841ea1d39be0fe780d4ae26c547ca5
|
|
| MD5 |
3bd90161ebec0b0be8e8486a0f6e4a3d
|
|
| BLAKE2b-256 |
c793fb088e8eba466b32ee4b4a968a846d5bb0577b9c0f4bf4688cfbcd496fff
|