Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python Circuit Breaker Pattern Example

This example demonstrates the Circuit Breaker design pattern in Python. It simulates an unreliable service that occasionally fails and wraps calls to it with a Circuit Breaker, showing how the breaker transitions between CLOSED, OPEN, and HALF_OPEN states to prevent cascading failures and allow recovery.

Language

python

How to Run

Save the code as main.py. Run from your terminal: python main.py

Original Article

This example accompanies the Turkish article: Sistemlerinizi Koruma Kalkanı: Devre Kesici Tasarım Deseni Nedir?.

License

MIT — see LICENSE.

About

This example demonstrates the Circuit Breaker design pattern in Python. It simulates an unreliable service that occasionally fails and wraps calls to it with a Circuit Breaker, showing how the breaker transitions between CLOSED, OPEN, and HALF_OPEN states to prevent cascading failures and allow recovery.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors