Example of the circuit breaker pattern in Python. Uses the pybreaker library.
$ git clone [email protected]:danriti/short-circuit.git
$ cd short-circuit
$ virtualenv .env
$ source .env/bin/activate
$ pip install -r requirements.txt
Run the following command each in a separate terminal:
$ cd short-circuit
$ source .env/bin/activate
$ python app.py
$ cd short-circuit
$ source .env/bin/activate
$ python service_time.py
$ cd short-circuit
$ source .env/bin/activate
$ python service_user.py
Now visit http://localhost:3000/
in your favorite browser!