pip install resilience-toolkit
(Hypothetical) example of multiple resilience methods working together
@timing(tmax=3)
@fallback()
@circuitbreaker()
@retry(tries=3, sleep=0.12, backoff=exponential)
@timing(tmax=0.3)
def foo(a,b):
# do some networking stuff
pass
@fallback.foo()
@timing(tmax=0.3)
def foo_alt():
# some backup method
pass
resilience-toolkit
is distributed under the terms of the MIT license.