{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/5"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/11"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/3"},{"label":"Monitoring","url":"https://skillfed.io/packages/category/system-monitoring/3"},{"label":"Networking","url":"https://skillfed.io/packages/category/system-networking"}],"enrichment":{"capability":"Purgatory implements the circuit breaker pattern for both synchronous and asynchronous Python code, preventing cascading failures by stopping repeated calls to failing services.","skillfed_tags":["resilience-pattern","async-first","distributed-systems"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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."},"id":"purgatory","links":{"html":"https://skillfed.io/packages/purgatory","md":"https://skillfed.io/packages/purgatory.md","pypi":"https://pypi.org/project/purgatory/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-11-02","license_spdx":null,"license_treatment":"permissive","name":"purgatory","python_support":"supports_current","summary":"A circuit breaker implementation for asyncio"},"popularity":{"monthly_downloads":582192,"position":5901,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0.1"}
