Python implementation of the Circuit Breaker pattern
PyBreaker is a Python implementation of the Circuit Breaker pattern, described in Michael T. Nygard's book Release It!. In Nygard's words, "circuit breakers exists to allow one subsystem to fail without destroying the entire system. This is done by wrapping dangerous operations (typically integration points) with a component that can circumvent calls when the system is not healthy". Features: - Configurable list of excluded exceptions (e.g. business exceptions) - Configurable failure threshold and reset timeout - Support for several event listeners per circuit breaker - Can guard generator functions - Functions and properties for easy monitoring and management - Thread-safe - Optional redis backing - Optional support for asynchronous Tornado calls
pkg install py311-pybreaker