$npx skillfedfor your agent

circuitbreaker

Python Circuit Breaker pattern implementation

Worth itPyPI MonitoringReleased Mar 202510.8M downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — circuitbreaker-2.1.3-py3-none-any.whl
v2.1.3 · released 2025-03-31

Yes. CircuitBreaker is a straightforward, dependency-free implementation of a well-established resilience pattern. It works with both sync and async code, has no install friction, and carries a permissive license. The aging maintenance status (last release 501 days ago) is a minor concern for a stable, narrowly-scoped library, but verify that its feature set and behavior match your needs before adopting it in production.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Maintenance is aging—last commit was 2025-03-31 and the project has not released since then, though the repository remains active and not archived.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause is a permissive license, allowing broad use, modification, and distribution with minimal restrictions.

last release 2025-03-31 (501 days) · last repo commit 2025-03-31 · 522 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,803,044 downloads/mo, #1,433 on PyPI

Verify before relying

from circuitbreaker import circuit

@circuit
def external_call():
    pass

# Or with configuration:
@circuit(failure_threshold=10, expected_exception=ConnectionError)
def external_call():
    pass
  • Whether the aging maintenance status (501 days since last release) affects stability or security for production use.
  • Performance characteristics under high-concurrency or high-failure-rate scenarios.
  • Compatibility with modern async frameworks beyond basic async/await support.
Same gist for agents: .md · .json

What it is and what it does

CircuitBreaker is a Python decorator that implements the Circuit Breaker pattern to protect distributed systems from cascading failures. When you decorate a function with @circuit, the decorator monitors execution, counts failures, and stops calling the function after a configurable threshold (default: 5 failures) is reached. After a recovery timeout (default: 30 seconds), it enters a half-open state to test whether the integration point has recovered.

The decorator supports both synchronous and asynchronous functions, and you can customize which exceptions trigger the circuit to open, set different failure thresholds and recovery timeouts, and provide fallback functions to execute when the circuit is open. It also integrates with a CircuitBreakerMonitor to track the health and state of all active circuit breakers in your application.

Use it for

  • Protect HTTP clients from repeatedly calling unavailable external APIs by opening the circuit after connection failures.
  • Prevent database connection pools from exhausting resources when a database is temporarily down.
  • Implement graceful degradation in microservices by using fallback functions when downstream services are unavailable.
  • Monitor the health of multiple integration points across your application via CircuitBreakerMonitor.
  • Rate-limit or fail fast on specific HTTP errors (e.g., 429 Too Many Requests) using custom exception logic.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

CircuitBreaker is a straightforward, dependency-free implementation of a well-established resilience pattern. It works with both sync and async code, has no install friction, and carries a permissive license. The aging maintenance status (last release 501 days ago) is a minor concern for a stable, narrowly-scoped library, but verify that its feature set and behavior match your needs before adopting it in production.

Install

circuitbreaker on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is aging—last commit was 2025-03-31 and the project has not released since then, though the repository remains active and not archived.

License in practice

BSD-3-Clause is a permissive license, allowing broad use, modification, and distribution with minimal restrictions.

Quickstart

from circuitbreaker import circuit

@circuit
def external_call():
    pass

# Or with configuration:
@circuit(failure_threshold=10, expected_exception=ConnectionError)
def external_call():
    pass

Verify before relying

  • Whether the aging maintenance status (501 days since last release) affects stability or security for production use.
  • Performance characteristics under high-concurrency or high-failure-rate scenarios.
  • Compatibility with modern async frameworks beyond basic async/await support.

Package facts

LicenseBSD-3-Clause permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 501 days since the last release
Last repo commit
First released
Downloads10,803,044 / month, #1,433 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: circuitbreaker-2.1.3-py3-none-any.whl

Tags

Capabilities
circuit breaker patternfault tolerance decoratorprevent cascading failuresdistributed system resiliencefailure threshold monitoringasync function protectionintegration point protection
Topics
resiliencefault-tolerancedistributed-systems

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 › “prevent cascading failures”

  • circuitbreakerA Python decorator that implements the Circuit Breaker pattern to…
  • aiobreakerImplements the Circuit Breaker pattern for asyncio applications,…
  • purgatoryPurgatory implements the circuit breaker pattern for both synchronous…

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.

Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.

Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.

Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also aiobreaker · purgatory · pybreaker · metaflow-checkpoint · retry2 · singleton-decorator · multimethod · python-backoff · pytest-check · delayed-assert