Skip to main content

Shared contracts for OSP providers and orchestrator.

Project description

osp-provider-contracts

Shared Python contract package for OSP providers and orchestrator: typed interfaces, canonical errors, capabilities schema, idempotency helpers, and lightweight conformance assertions.

Scope (v0.1)

  • Small, explicit provider protocol
  • Shared request/result/context types
  • Canonical error taxonomy with retry metadata
  • Capabilities schema validation
  • Conformance assertions for provider test suites
  • Canonical gate code enum for approval-required flows

No pytest plugin is included in v0.1.

Approval-Required Contract

Providers that need human approval should raise ValidationError with detail=\"approval_required\" and include a structured extra payload:

  • gate_code: one of osp_provider_contracts.GateCode values (4xx)
  • importance: integer risk/urgency indicator when applicable
  • reason: stable machine-readable reason string
  • details: provider-specific context for operators and audit

Install

pip install osp-provider-contracts

Development

env -u VIRTUAL_ENV uv sync --extra dev
hatch shell
hatch run check
hatch run build
hatch run verify

Release

See docs/release.md for the manual/gated publish flow.

Tag and push:

git tag v0.2.0
git push origin v0.2.0

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

osp_provider_contracts-0.2.1.tar.gz (162.3 kB view details)

Uploaded Source

Built Distribution

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

osp_provider_contracts-0.2.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file osp_provider_contracts-0.2.1.tar.gz.

File metadata

  • Download URL: osp_provider_contracts-0.2.1.tar.gz
  • Upload date:
  • Size: 162.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for osp_provider_contracts-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d488ffc6eb10605bc88cbf8cd35ac4b16472297c62110a22f0c226b9eccb9569
MD5 69e27109075d5627413a5cc3254fa3a0
BLAKE2b-256 d7c74b2b5a9ad5ae68f0a019f403970414fa02d577308542fc7f2409f17148dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osp_provider_contracts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29ccacf87c8232b5a1032654419444fb5de6268135b99c3776ac0cfbd3e3e4b0
MD5 dab9830d37ed344cde7720f563b962f4
BLAKE2b-256 7a2710dc8cd946fded71bdb32b9bed687e812df20773d95970e85dbf7b70b363

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