Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Circuitbreaker pattern for gevent apps

Project description


[![Build Status](](

Circuit Breaker pattern for gevent apps.


$ pip install gevent-breaker


from gevent_breaker import circuit_breaker, CircuitBroken
while True:
# After enough errors (5 by default), raise a CircuitBroken
with circuit_breaker("breaker1"):
except ZeroDivisionError:
print("Got an exception!")
except CircuitBroken:
print("Too many errors!")

# Don't raise a CircuitBroken, instead just wait for a period
# of time (default 60s) before trying again.
with circuit_breaker("breaker2", block=True):
except ZeroDivisionError:
print("Got an exception")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gevent-breaker, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size gevent_breaker-1.0.0-py2.py3-none-any.whl (6.2 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size gevent-breaker-1.0.0.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page