Skip to main content

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 Schemasfidelity_report.schema.json, provenance_row.schema.json bundled inside the wheel at pharm0_contracts/schemas/. Draft 2020-12.
  • OpenAPI-derived types — regenerated from ../../openapi/*.yaml on release (do not hand-edit files under src/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pharm0_contracts-0.2.0rc1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

pharm0_contracts-0.2.0rc1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file pharm0_contracts-0.2.0rc1.tar.gz.

File metadata

  • Download URL: pharm0_contracts-0.2.0rc1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pharm0_contracts-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 1b6a345538090134e4aaae5975de11ca0f1effc0393a50e287b61b253240f31e
MD5 190ddef94a61a6cabb46047e0a430db7
BLAKE2b-256 d59322b11fe3228f57f13e7e971de0f190c4f9adc0018c5e0282396dd13d04df

See more details on using hashes here.

File details

Details for the file pharm0_contracts-0.2.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for pharm0_contracts-0.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f13e33d1091bd5389965911d2a10ea4d4605e306f2c4260e5a4c392c5c23118
MD5 84b0db9d2bb5a16ba467aa3ea880d63f
BLAKE2b-256 7400353ca7ca30e0e15f5d85659da37eaef6a9282203b5589d72297dcc3da723

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page