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

  • OSP_RUNTIME_PREFETCH_COUNT (default 1)
  • OSP_RUNTIME_CONCURRENCY (default 1)
  • OSP_RUNTIME_MAX_ATTEMPTS (default 5)
  • OSP_RUNTIME_HANDLER_TIMEOUT_SECONDS (optional)
  • OSP_RUNTIME_DEAD_LETTER_EXCHANGE (optional)
  • OSP_RUNTIME_DEAD_LETTER_ROUTING_KEY (optional)
  • OSP_RUNTIME_HEARTBEAT_SECONDS (default 60)
  • OSP_RUNTIME_BLOCKED_CONNECTION_TIMEOUT_SECONDS (default 30)

Tag and push:

git tag v0.1.0
git push origin v0.1.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.1.1.tar.gz (54.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.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: osp_provider_runtime-0.1.1.tar.gz
  • Upload date:
  • Size: 54.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.1.1.tar.gz
Algorithm Hash digest
SHA256 b521d8a77fbc5505edf309f469eedc62dc625c81128d46bfcbb3aa27e4f30ee3
MD5 edd625bbff7a95e321e23bb7c01c237f
BLAKE2b-256 6f0d5431d458af7534cb7e592340e5e17d67c496936fc1996b3c4572b3442d84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osp_provider_runtime-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 994f0fe8ceb19f5a1d51d3c36a03b94130ff1e00e5626a40dd3d0c6bc252a522
MD5 eb47c6e30c6a590a4e005505ae3bbd0c
BLAKE2b-256 07e9851cca86dda4c643f32d2a2b5e0a941c6f3213af8ca2936ab4229e86be17

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