Skip to main content

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 ThreadPoolExecutor implementation for CPU-bound or blocking IO tasks.
  • Observability: Full contextvars support for distributed tracing (OpenTelemetry/Datadog).
  • Type Safe: 100% type-hinted and rigorously tested (>92% coverage).

Documentation

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bulkman-2.0.1.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bulkman-2.0.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file bulkman-2.0.1.tar.gz.

File metadata

  • Download URL: bulkman-2.0.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for bulkman-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e8af6189a62c8b5907c86fdf1a305db0320783efb968a3f3b76c8615ab58805a
MD5 86be8db7afc49e6857e1b0c76a8dfe1f
BLAKE2b-256 e50e3fa7dd8ae3f3942fdb47c57447c589a8a43e901787d0c32be47cd935c5d1

See more details on using hashes here.

File details

Details for the file bulkman-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: bulkman-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for bulkman-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a22c933d7dd828c74fe4c75615c2c8bab7781143e02bdd84c4a3ccd2f78b5db
MD5 6703c040fb3d6218d719ca0533832fe0
BLAKE2b-256 8a949c38b28d803f33c3ddf033d54ad114d5a26f250c282f95187607a40a97df

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 Sentry Error logging StatusPage Status page