Bulkman
Enterprise-Grade Bulkhead Pattern for Python
Bulkman is a robust, production-ready implementation of the Bulkhead pattern, designed to isolate resources and prevent cascading failures in mission-critical distributed systems. It supports both modern async (AnyIO/asyncio) and traditional synchronous (Threading) workloads with zero overhead.
Key Capabilities
- Resource Isolation: Limits concurrent access to prevent service exhaustion.
- Circuit Breaker Integration: Built-in distributed circuit breaking via
resilient-circuit(opt-in, disabled by default). - Dual Mode:
- Async: AnyIO-based (asyncio) for high-concurrency IO.
- Sync: Zero-overhead
ThreadPoolExecutorimplementation for CPU-bound or blocking IO tasks.
- Observability: Full
contextvarssupport for distributed tracing (OpenTelemetry/Datadog). - Type Safe: 100% type-hinted and rigorously tested (>92% coverage).
Documentation
- User Guide: Installation, Quick Start (Async), and Configuration.
- Synchronous / Threading Guide: Best practices for blocking workloads (Flask, Django, Scripts).
- Contributing: Setup, testing, and contribution guidelines.
Quick Install
pip install bulkman
Quick Example (Blocking/Threading)
For legacy or synchronous applications, use BulkheadThreading:
from bulkman import BulkheadThreading, BulkheadConfig
# Configure
config = BulkheadConfig(name="db_writer", max_concurrent_calls=10, timeout_seconds=5.0)
bulkhead = BulkheadThreading(config)
# Execute
try:
future = bulkhead.execute(my_blocking_function, data)
result = future.result(timeout=5.0)
print(result.result)
except TimeoutError:
print("System overloaded")
👉 See the User Guide for async examples
License
Licensed under the Apache License 2.0.
Metadata
Release files for bulkman 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bulkman-2.0.4.tar.gz | 44.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bulkman-2.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.0 kB
Release files / bulkman-2.0.4.tar.gz
| Download URL | bulkman-2.0.4.tar.gz |
|---|---|
| Size | 44.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8961d3be768c355710ff92c4d67cdbb0dd577fd06a890b2ec29324cc06b9315d
|
|
BLAKE2b-256 checksum How to use checksums |
adb43e80de8dd30db81e52e05878a0eeb4a02d47053b57b4bbd2a605872fb724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / bulkman-2.0.4-py3-none-any.whl
| Download URL | bulkman-2.0.4-py3-none-any.whl |
|---|---|
| Size | 25.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f532120ca0c4dba003feb9217c7ed72af507d1ab69e0c8de7dd04bba5efce45
|
|
BLAKE2b-256 checksum How to use checksums |
443b3ae7255032873c76cdbe9b6989b48dbf492691deb68f8eb5729156708a36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|