$npx skillfedfor your agent

purgatory

A circuit breaker implementation for asyncio

With conditionsPyPI LibrariesReleased Nov 2024582.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — purgatory-3.0.1-py3-none-any.whl
v3.0.1 · released 2024-11-02 · Python >=3.9

Yes, if you need circuit breaker functionality for async or sync code. The library is permissively licensed, has no external dependencies, and is fully typed. However, the aging maintenance status (650 days since last release) means you should verify that the library's feature set and behavior match your exact needs before committing to it in a critical system.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low install friction with no runtime dependencies.
  • Maintenance shows aging status—last release was 650 days ago, though the repository remains active with a recent commit on 2025-07-15.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) allows free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.

last release 2024-11-02 (650 days) · last repo commit 2025-07-15 · 4 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 582,192 downloads/mo, #5,901 on PyPI

Verify before relying

from purgatory import AsyncCircuitBreakerFactory

circuitbreaker = AsyncCircuitBreakerFactory()
async with await circuitbreaker.get_breaker("my_circuit"):
    # protected code here
    pass
  • Whether Redis backend integration is production-ready and what configuration is required.
  • Performance characteristics under high concurrency or with many simultaneous circuit breakers.
  • Compatibility with popular async frameworks beyond asyncio (e.g., Trio, Curio).
Same gist for agents: .md · .json

What it is and what it does

Purgatory is a Python circuit breaker library that wraps calls to external services or dependencies to detect and respond to failures. It implements the circuit breaker design pattern, which maintains system stability by preventing repeated calls to failing services during outages or maintenance windows. The library supports both synchronous and asynchronous code paths and can be used as a context manager or decorator, making it flexible for different integration patterns.

The library offers configurable state storage (in-memory or Redis), event hooks for monitoring circuit state changes, and full type annotations. It's designed for distributed systems where shared state across multiple processes is important, and it provides visibility into circuit behavior through monitoring events.

Use it for

  • Wrap HTTP calls to external APIs to prevent request storms when a service is temporarily down.
  • Protect database queries in microservices to stop cascading failures across service boundaries.
  • Monitor and react to circuit state changes in real time using event hooks for alerting or logging.
  • Share circuit state across multiple application instances using Redis as a distributed backend.
  • Decorate async functions in asyncio applications to add automatic failure isolation without refactoring.

Worth the install?

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

With conditions

Yes, if you need circuit breaker functionality for async or sync code.

The library is permissively licensed, has no external dependencies, and is fully typed. However, the aging maintenance status (650 days since last release) means you should verify that the library's feature set and behavior match your exact needs before committing to it in a critical system.

Install

purgatory on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance shows aging status—last release was 650 days ago, though the repository remains active with a recent commit on 2025-07-15.

Requires Python 3.9 or later.

License in practice

MIT license (permissive) allows free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.

Quickstart

from purgatory import AsyncCircuitBreakerFactory

circuitbreaker = AsyncCircuitBreakerFactory()
async with await circuitbreaker.get_breaker("my_circuit"):
    # protected code here
    pass

Verify before relying

  • Whether Redis backend integration is production-ready and what configuration is required.
  • Performance characteristics under high concurrency or with many simultaneous circuit breakers.
  • Compatibility with popular async frameworks beyond asyncio (e.g., Trio, Curio).

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 650 days since the last release
Last repo commit
First released
Downloads582,192 / month, #5,901 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: AsyncIOIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentTopic :: Internet :: WWW/HTTPTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: MonitoringTopic :: System :: NetworkingTyping :: Typed

Evidence: purgatory-3.0.1-py3-none-any.whl

Tags

Capabilities
circuit breaker patternasync failure managementprevent cascading failuresresilience library pythonservice failure handlingcircuit breaker asyncfault tolerance decorator
Topics
resilience-patternasync-firstdistributed-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 › “circuit breaker pattern”

  • purgatoryPurgatory implements the circuit breaker pattern for both synchronous…
  • pybreakerPyBreaker wraps function calls with a circuit breaker that…
  • aiobreakerImplements the Circuit Breaker pattern for asyncio applications,…

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

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

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.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

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.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

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.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

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.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

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.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also circuitbreaker · aiobreaker · pybreaker · waiter · vercel-cache · synchronicity · pytest-check · pytest-instafail · janus · stamina