Skip to main content

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.pyWireModel, 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 extending WireModel. They carry shape + per-field validation: enums (named from the proto descriptor, *_UNSPECIFIED dropped), string patterns, length/item bounds. Nested messages reference the same model (LicenseTerm.license is a License), 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, …) with is_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

fora_protocol-1.0.3.tar.gz (64.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fora_protocol-1.0.3-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file fora_protocol-1.0.3.tar.gz.

File metadata

  • Download URL: fora_protocol-1.0.3.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

Hashes for fora_protocol-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ef0be91ea55ab78967ed44f61be07a6b6efcea1b8bea8600ed0ff0bdf1ba44f8
MD5 ddd2f693169a7ce738b9eee0e623d65f
BLAKE2b-256 1ccc6de313385f4c0c9ddccee836c493a6cb5e82b124425221c4733f37395499

See more details on using hashes here.

File details

Details for the file fora_protocol-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: fora_protocol-1.0.3-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

Hashes for fora_protocol-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 77c9a81711a61f5d75d1b0b4590033e2de6f1de75bb9b269b3f7de2261644387
MD5 befa0e532fa46801222676218d4c77d0
BLAKE2b-256 1bff516d91a3da31715a08162365212c0451e9a12fd3dc12ada1ef547f04feb7

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.4

2 files

This release

1.0.3 This release

2 files

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