Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 899 Bytes

README.md

File metadata and controls

43 lines (30 loc) · 899 Bytes

resilience-toolkit

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install resilience-toolkit

Examples

(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

License

resilience-toolkit is distributed under the terms of the MIT license.