pybreaker
Python implementation of the Circuit Breaker pattern
Decision gist · record as of 2026-08-14
Yes. PyBreaker is a mature, actively maintained library with zero known vulnerabilities, low install friction, and permissive licensing. It solves a real problem in distributed systems and integration points. Use it when you need to protect against cascading failures from external services or databases. The decorator-based API is straightforward, and optional Redis backing scales to multi-instance deployments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9+.
- Optional Redis dependency if using CircuitRedisStorage for distributed state.
- Low install friction with no runtime dependencies.
License · maintenance · safety
permissive license (permissive) — Permissive license (BSD) allows use in commercial and proprietary projects without viral obligations.
last release 2025-09-21 (327 days) · last repo commit 2026-07-04 · 691 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 36,034,984 downloads/mo, #739 on PyPI
Alternatives
Verify before relying
import pybreaker
db_breaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=60)
@db_breaker
def update_customer(cust):
# database operation
pass
update_customer(my_customer)- Whether Redis backing is optional or required for production use cases
- Performance overhead of circuit breaker wrapping under high call volume
- Tornado async support maturity and whether it's actively used
What it is and what it does
PyBreaker is a Python implementation of the Circuit Breaker design pattern, which prevents cascading failures by stopping calls to a failing service after a configurable error threshold is reached. When the circuit opens, subsequent calls fail immediately without attempting the operation, allowing the failing service time to recover. After a reset timeout, the circuit enters a half-open state and allows a test call through; if it succeeds, the circuit closes and normal operation resumes.
The library supports multiple usage patterns: decorators on functions, explicit call() invocation, and context managers. It offers event listeners for monitoring state changes and failures, thread-safe operation, optional Redis backing for distributed systems, and optional Tornado async support. You can exclude specific exceptions (like business validation errors) from triggering the breaker, and configure success thresholds to require multiple successful calls before fully closing the circuit.
Use it for
- Protect database queries from cascading failures when a database becomes unresponsive
- Guard external API calls to fail fast and prevent timeout accumulation during outages
- Implement resilient microservice communication by stopping calls to unhealthy downstream services
- Monitor integration point health and trigger alerts when circuits open repeatedly
- Distribute circuit state across multiple application instances using Redis storage
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyBreaker is a mature, actively maintained library with zero known vulnerabilities, low install friction, and permissive licensing. It solves a real problem in distributed systems and integration points. Use it when you need to protect against cascading failures from external services or databases. The decorator-based API is straightforward, and optional Redis backing scales to multi-instance deployments.
Install
pybreaker on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained; last commit 2026-07-04, latest release 2025-09-21. Requires Python 3.9+.
Requires Python 3.9+. Optional Redis dependency if using CircuitRedisStorage for distributed state.
License in practice
Permissive license (BSD) allows use in commercial and proprietary projects without viral obligations.
Quickstart
import pybreaker
db_breaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=60)
@db_breaker
def update_customer(cust):
# database operation
pass
update_customer(my_customer)
Verify before relying
- Whether Redis backing is optional or required for production use cases
- Performance overhead of circuit breaker wrapping under high call volume
- Tornado async support maturity and whether it's actively used
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 327 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 36,034,984 / month, #739 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: Libraries |
Evidence: pybreaker-1.4.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “graceful degradation”
- pybreakerPyBreaker wraps function calls with a circuit breaker that…
- msal-extensionsProvides secure, platform-specific token cache persistence for MSAL…
- UnleashClientA server-side Python SDK for integrating with Unleash, a feature…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also aiobreaker · circuitbreaker · purgatory · retrying · retry2 · retry-decorator · robotframework-retryfailed · reretry · pytest-check · retry