Comparison
backoff vs retry vs retry2 vs tenacity
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Function decoration for backoff and retry
Archived. The repository is read-only: no more fixes or releases will come.
$
pip install backoffEasy to use retry decorator.
Likely abandoned. No release or commit for years (last release over 10 years ago).
$
pip install retryEasy to use retry decorator.
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
$
pip install retry2Retry code until it succeeds
Maintained. Last release 8 weeks ago, commits in 11 of the last 26 weeks. Weaker on issue handling.
$
pip install tenacityIn short
- backoff is archived: avoid it for new projects.
- retry looks abandoned: avoid it for new projects.
- retry2 is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- tenacity is the most used: 423.6M downloads a month, 3.0× more than backoff.
- tenacity also has the best Pythie’s Index (69).
- Safe default for a new project: tenacity.