--- id: aiobreaker version: "1.2.0" license: BSD license_treatment: permissive maintenance: abandoned --- # aiobreaker — Python implementation of the Circuit Breaker pattern. License: permissive · Maintenance: abandoned · Downloads: 409.0K/mo ## What it is and what it does aiobreaker is an asyncio-native implementation of the Circuit Breaker pattern, a design pattern that prevents cascading failures by wrapping calls to external services or integration points. When a service fails repeatedly, the circuit breaker stops sending requests to it temporarily, allowing the service time to recover while your application handles the failure gracefully instead of repeatedly hitting a broken endpoint. The package lets you decorate async functions with a circuit breaker that tracks failures, opens when a threshold is reached, and automatically resets after a timeout. It supports configurable failure thresholds, excluded exceptions (for business logic errors that shouldn't trigger the breaker), event listeners for monitoring, and optional Redis-backed state sharing across processes. However, the project is no longer maintained—the last commit was in early 2022—so it may not work correctly with recent Python or asyncio changes. Use it for: - Protect database queries from overwhelming a struggling database by stopping requests when failures spike - Guard API calls to third-party services so your app fails fast instead of timing out repeatedly - Implement resilience in microservices by preventing one failing service from dragging down dependent services - Monitor integration point health with event listeners to alert on repeated failures or circuit state changes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements the Circuit Breaker pattern for asyncio applications, allowing you to wrap dangerous operations (like external API calls or database queries) so they fail gracefully without cascading failures across your system. Yes, if you need Circuit Breaker pattern support in an asyncio application and can accept that the package is unmaintained. The code is simple, has no dependencies, and the pattern itself is stable—but be aware that it will not receive updates for Python version changes or asyncio improvements. Consider it only for stable, long-lived codebases where you can maintain a fork if needed. ## Install pip install aiobreaker uv add aiobreaker poetry add aiobreaker ## Installing aiobreaker Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2021-05-17 and last commit 2022-01-01—so it will not receive bug fixes or security updates for new Python or asyncio changes. License in practice: BSD permissive license means you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install aiobreaker from aiobreaker import CircuitBreaker from datetime import timedelta db_breaker = CircuitBreaker(fail_max=5, reset_timeout=timedelta(seconds=60)) @db_breaker async def outside_integration(): # Your async operation here pass Requires Python 3.6 or higher; designed for asyncio-based applications only. Verify before relying: - Whether the package works reliably with Python versions released after 2022-01-01 - Current compatibility with modern asyncio implementations and async/await patterns - Whether optional Redis backing feature is functional and documented ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 409.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags circuit breaker asyncio, async fault tolerance, prevent cascading failures, asyncio resilience pattern, integration point protection, async error handling wrapper, circuit-breaker, asyncio, resilience [View on SkillFed](https://skillfed.io/packages/aiobreaker) · [View on PyPI](https://pypi.org/project/aiobreaker/)