Skip to main content

Thin runtime harness for OSP providers (RabbitMQ transport + contract execution).

Project description

osp-provider-runtime

Thin, boring runtime harness for OSP providers.

This package handles RabbitMQ message plumbing so provider implementations can focus on business logic.

What it does (v0.1)

  • Parses a versioned request envelope.
  • Builds provider RequestContext/ProviderRequest and calls execute(...).
  • Serializes a standard response envelope.
  • Applies explicit ack/requeue/dead-letter decisions.
  • Emits structured logs for delivery decisions.
  • Supports explicit runtime knobs for prefetch/concurrency/retries/timeouts/DLQ.

What it does not do

  • No provider framework.
  • No plugin system.
  • No workflow orchestration.

Install

pip install osp-provider-runtime

Development

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

Note: before osp-provider-contracts is published to your index, use uv for local checks in this monorepo:

env -u VIRTUAL_ENV uv run ruff check .
env -u VIRTUAL_ENV uv run mypy src tests
env -u VIRTUAL_ENV uv run pytest

Runtime Knobs

Set these via RuntimeConfig in your provider runtime_app.py:

  • prefetch_count (default 1)
  • concurrency (default 1)
  • max_attempts (default 5)
  • handler_timeout_seconds (optional)
  • dead_letter_exchange (optional)
  • dead_letter_routing_key (optional)
  • heartbeat_seconds (default 60)
  • blocked_connection_timeout_seconds (default 30)
  • emit_legacy_updates (default True)
  • emit_legacy_updates_for_contract_requests (default True)

Update Emission

Use TaskReporter for provider task lifecycle updates. The runtime keeps transport details compatible with orchestrator consumers.

Docs:

  • docs/runtime-contract.md
  • docs/provider-updates.md
  • docs/migration-task-reporter.md
  • docs/runtime-upgrade-checklist.md
  • docs/release-notes-task-reporter.md

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_runtime-0.2.8.tar.gz (66.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_runtime-0.2.8-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file osp_provider_runtime-0.2.8.tar.gz.

File metadata

  • Download URL: osp_provider_runtime-0.2.8.tar.gz
  • Upload date:
  • Size: 66.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_runtime-0.2.8.tar.gz
Algorithm Hash digest
SHA256 e548fb6eb6a8afa2b4626bf155ccfe0cd0d9da2d6b60613dbda26cfaaddf35a5
MD5 c41d6e7da1468927d18a5f8f6cc446c0
BLAKE2b-256 5809459a51d81c4ce6f9d2662605463f2fbfa92bcff421a75a3963e97d07eb88

See more details on using hashes here.

File details

Details for the file osp_provider_runtime-0.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for osp_provider_runtime-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9b25a122b6cd404416a1617055e7aed4ce80f501be9e8a909cf5b8a19c17362a
MD5 4ddd4cbca7df39c5cc5bacde705a3564
BLAKE2b-256 201a8cb4b8dc1ae7ac072fe54c94a55a06d48b1581335a6e9d25e437b79623df

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