Small pieces.
Strong foundations.
Twelve Python libraries for the infrastructure behind your service. Pick what you need. Keep the conventions that make it all fit together.
The package directory
12 Bedrock libraries + a few useful neighboursService runtime & transports
4Run a service; call other services.
servicewright
One Host, many Entrypoints: FastAPI, Litestar, gRPC, scheduler, daemon or one-shot batch under a single Kubernetes-correct lifecycle.
uv add servicewrightclientwright
One resilience and observability core wired under the public API of httpx, aiohttp, requests and urllib3 — you get back the genuine native client.
uv add clientwrightgrpc-server-kit
grpc.aio servers without the boilerplate: a GrpcApp facade, TLS/mTLS, graceful shutdown, health checking, streaming-aware interceptors.
uv add grpc-server-kitgrpc-client-kit
The caller side: a channel pool keyed by full channel identity, load balancing, health monitoring, and retries under a deadline that spans the whole call.
uv add grpc-client-kitData & messaging foundations
3Postgres, Redis, Kafka — the clients every service needs.
sqlalchemy-foundation-kit
Async session management that stays pgbouncer-safe, a Unit of Work, base ORM models, pool metrics and tracing, dishka and dependency-injector providers.
uv add sqlalchemy-foundation-kitredis-client-kit
Async and sync redis-py clients with cluster support, pooling, health checks and retries; Pydantic settings, Prometheus and Dishka as extras.
uv add redis-client-kitaiokafka-foundation-kit
Producer and consumer factories over aiokafka with Pydantic settings, retry policies, health checks, Prometheus metrics and OpenTelemetry.
uv add aiokafka-foundation-kitReliability patterns
3Exactly-once effects and bounded latency.
omni-box
Transactional Outbox and Inbox: the event goes in the same transaction as the business row, out to Kafka from a background publisher, in with deduplication.
uv add omni-boxidempotency-kit
Execute an operation once per idempotency key: a coordinator and a decorator over Redis, collision handling, graceful degradation, metrics.
uv add idempotency-kitdeadline-budget
One request deadline budget with per-call caps and a safety margin — the budget that clientwright, grpc-client-kit and servicewright propagate across hops.
uv add deadline-budgetDatabase operations & testing
2Partitions planned, migrations tested.
pg-partsmith
PostgreSQL partition lifecycle management with a plan you can read before it runs: RANGE, LIST and HASH nested to any depth — as a library, a CLI and a container image.
uv add pg-partsmithalembic-gauntlet
A pytest plugin that runs Alembic migrations through the gauntlet: stairway up and down, models drift, single head, full downgrade, naming conventions.
uv add alembic-gauntletStart your own
1Every library above began here.
python-library-template
The Copier template: uv, hatchling, ruff, mypy, pytest with unit and integration lanes, Zensical docs, Release Please with PyPI trusted publishing, and the org repo-settings script.
Recommended
2Not ours. Libraries built with the same care.
aiofence
Multi-reason cancellation for asyncio in the spirit of Go's context.Context: declare timeout, client disconnect and shutdown once at the boundary, carry them in a ContextVar, wrap only the work you want cancelled in a Fence, and ask afterwards which reason fired.
uv add aiofenced9d
A distributed training framework on PyTorch 2 that stays hackable: composable parallelism strategies instead of one god class, plain nn.Modules, DTensor for every distributed parameter, checkpoints as a graph — from single-GPU debugging to 6D-parallel clusters.
uv add d9dNo packages found.
Try a broader term such as “Kafka”, “client”, or “migrations”.
Version badges link to PyPI and refresh when the page loads.