Python types generated from Pharm0 OpenAPI + proto schemas.
Project description
pharm0-contracts (Python)
Shared schemas + Python types for the Pharm0 platform, lab, and web repos.
Install
uv add pharm0-contracts
# or: pip install pharm0-contracts
What's in this package
- JSON Schemas —
fidelity_report.schema.json,provenance_row.schema.jsonbundled inside the wheel atpharm0_contracts/schemas/. Draft 2020-12. - OpenAPI-derived types — regenerated from
../../openapi/*.yamlon release (do not hand-edit files undersrc/pharm0_contracts/generated/).
Usage
Schemas
from pharm0_contracts import (
__version__,
fidelity_report_schema,
provenance_row_schema,
load_schema,
)
# Direct module-level constants (eagerly loaded at import)
print(fidelity_report_schema["title"])
# → 'Pharm0 fidelity-report.json'
# Dynamic loading
schema = load_schema("provenance_row")
# Example: validate with jsonschema
import jsonschema
jsonschema.Draft202012Validator(fidelity_report_schema).validate(report_dict)
OpenAPI types (future release)
from pharm0_contracts.platform import AgentInvocation # noqa (post-generate)
Versioning
See the root CHANGELOG.md. Breaking changes require a major version bump.
Project details
Release history Release notifications | RSS feed
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 pharm0_contracts-0.1.0.tar.gz.
File metadata
- Download URL: pharm0_contracts-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a42ba0ab299b6ef95dc94fecbf5174861d9bca52138a11a76aff49c7dc9c382
|
|
| MD5 |
171c1bf22b767f87dff5fe7c5a2223d7
|
|
| BLAKE2b-256 |
35c3b852752b5fb221141535975e32277cd25cb08ab210c3a1fa308ef8117880
|
File details
Details for the file pharm0_contracts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pharm0_contracts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
420849931b640dc09bca3fd2eff0f816d3d68f5c8b0c0621256a661d6078d4e7
|
|
| MD5 |
1ce234dd84d345b350804ebf90ffa12a
|
|
| BLAKE2b-256 |
7c7f1a6e178027d16f3ee0e6029cad9cf17e9e7e46883a16875c9ffeb5de9e03
|