Backoff
Backoff is a library for function decoration that adds retry capabilities with configurable backoff policies. The current version is 2.2.1, released on 2022-10-05, with a regular maintenance cadence.
Warnings
- breaking Dropped support for Python 3.6 in version 2.0.0.
- deprecated Python 2.7 support was removed in version 2.0.0.
Install
-
pip install backoff
Imports
- backoff
import backoff
Quickstart
import backoff
@backoff.on_exception(backoff.expo, Exception)
def my_function():
# Your code here
pass
if __name__ == '__main__':
my_function()