Skip to main content

Canonical Pydantic schemas for QueryTek Education Benefits Manager (EBM)

Project description

ebm-schemas

Canonical Pydantic models used across the QueryTek EBM services.

This package provides small, stable, and extensible Pydantic models used as the single source of truth for API contracts, worker payloads, and OpenAPI generation.

Included models (Phase‑0)

  • Person
  • Course
  • Milestone
  • Refund
  • Entitlement
  • Provider
  • Enrollment
  • Transaction
  • Organization
  • WebhookEvent
  • EntitlementAssignment

Purpose

  • Provide canonical, backwards-compatible shapes for payloads exchanged between services.
  • Make the OpenAPI spec authoritative by using the same models in the service code and the exporter.
  • Allow other services to import the models and validate provider payloads with a shared contract.

Extension rules & versioning

  • Backwards-compatible changes:
    • Add new optional fields freely.
    • Add new models in minor releases.
  • Breaking changes:
    • Avoid removing or renaming existing fields.
    • If you must break a model, introduce a new versioned model and bump the package major version.
  • Versioning policy:
    • The package follows semantic-style versioning for consumer consumption (0.x for early development). When stable, move to 1.0.0.

How to use locally

Install editable during development:

cd /path/to/repo
. services/ebm-api/venv/bin/activate
pip install -e libs/ebm_schemas

Import in code:

from ebm_schemas import Person, Provider, WebhookEvent

Building a wheel locally

Recommended: use the build module (PEP 517):

python -m pip install --upgrade build
cd libs/ebm_schemas
python -m build --wheel
# wheel will be in libs/ebm_schemas/dist/

Publishing

  • To create a git tag and GitHub release:
    • Tag: git tag -a v0.2.0 -m "ebm-schemas 0.2.0"
    • Push: git push origin v0.2.0
    • Create release and attach wheel (or let CI create release artifacts).
  • To publish to PyPI (if desired), use twine:
python -m pip install --upgrade twine
python -m twine upload dist/ebm_schemas-0.2.0-*.whl

(Only publish to PyPI if you want the package publicly available.)

Notes

  • The package depends on email-validator because models use pydantic.EmailStr.
  • The exporter script has been made robust to automatically import and inject these canonical schemas into the OpenAPI export used by the ebm-api service.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ebm_schemas-0.2.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file ebm_schemas-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ebm_schemas-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ebm_schemas-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0cdc12adcaa548977f4fc3ea66672989a3caa58eecd09798c50ba86449e64f
MD5 19148ae0a6745d25a3c2e15da59cf5c8
BLAKE2b-256 208872dd388fb68bdefe3d815be48817dbb530cdcad71ed52b4ec997271f17c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ebm_schemas-0.2.1-py3-none-any.whl:

Publisher: release.yml on Extanto-Technology-LLC/querytek-ebm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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