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.
For maintainer-facing internals and invariants, see src/README.md.
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 reason 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_reason: one ofosp_provider_contracts.GateReasonstring valuesimportance: integer risk/urgency indicator when applicable (1 => 2 approvals)required_approvals: optional explicit quorum override (e.g., 2 for dual control)reason: stable machine-readable reason stringdetails: 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
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 osp_provider_contracts-0.2.7.tar.gz.
File metadata
- Download URL: osp_provider_contracts-0.2.7.tar.gz
- Upload date:
- Size: 60.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33772eacf0fd4402f8fa96dafdce3ae49455e3be223496a37e3a3029a761031
|
|
| MD5 |
7f2dd4c2c42dc2a7a8cc2d028f18aacd
|
|
| BLAKE2b-256 |
672c87d310754049c23de22e13687b448f963c70877d6a9bcf4c2be5c0ca1de6
|
File details
Details for the file osp_provider_contracts-0.2.7-py3-none-any.whl.
File metadata
- Download URL: osp_provider_contracts-0.2.7-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0a958b3ae99c331ee57a8c094595375b1be89a17687b8888192189364f1a854
|
|
| MD5 |
dfcda0a53cc7dea5c8e9de333b498976
|
|
| BLAKE2b-256 |
4047b1b6ac072ae4699517764a997ef639417f7730ec1626d4110f717f7536e1
|