retry
Easy to use retry decorator.
Install
retry on PyPI
pip
pip install retryuv
uv add retrypoetry
poetry add retryPackage facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — decorator, py |
| Maintenance | dormant — 3,746 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: retry-0.9.2-py2.py3-none-any.whl
About retry
from the package's own PyPI description — quoted content, verbatim
retry
.. image:: https://pypip.in/d/retry/badge.png :target: https://pypi.python.org/pypi/retry/
.. image:: https://pypip.in/v/retry/badge.png :target: https://pypi.python.org/pypi/retry/
.. image:: https://pypip.in/license/retry/badge.png :target: https://pypi.python.org/pypi/retry/
Easy to use retry decorator.
Features
- No external dependency (stdlib only).
- (Optionally) Preserve function signatures (
pip install decorator). - Original traceback, easy to debug.
Installation
.. code-block:: bash
$ pip install retry
API
retry decorator ^^^^^^^^^^^^^^^
.. code:: python
def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
"""Return a retry decorator.
:param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
:param tries: the maximum number of attempts. default: -1 (infinite).
:param delay: initial delay between attempts. default: 0.
:param max_delay: the maximum value of delay. default: None (no limit).
:param backoff: multiplier applied to delay between...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
A decorator and function wrapper for implementing automatic retry logic with configurable delays, backoff strategies, and exception handling.
Low friction install with just two lightweight runtime dependencies (decorator and py). However, the package is dormant—last release was 2016-05-11, over a decade ago, though the repository remains active with a recent commit on 2024-07-05.
Licensed under Apache License 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Usage
pip install retry
from retry import retry
@retry(ValueError, tries=3, delay=1)
def my_function():
pass
my_function()
Verdict: A stable, lightweight retry decorator suitable for straightforward retry patterns. No known vulnerabilities and permissive licensing are strengths. The long dormancy since 2016-05-11 and lack of recent releases raise questions about modern compatibility, though the simple codebase and recent repository activity suggest it may still work. Best for projects with minimal retry needs where the decorator pattern fits naturally.
Needs verification
- Whether the package actually supports Python versions beyond 3.4 despite classifier listing
- Whether recent commits represent active maintenance or just repository preservation
- Real-world compatibility with current versions of decorator and py dependencies
Similar packages
unclear · top 1,000 on PyPI
backoffpermissive · top 1,000 on PyPI
pytest-rerunfailurescopyleft · top 1,000 on PyPI
aiohttp-retrypermissive · top 1,000 on PyPI
docstring-parserpermissive · top 1,000 on PyPI
retryingpermissive · top 1,000 on PyPI
async-timeoutpermissive · top 1,000 on PyPI
tenacitypermissive · top 100 on PyPI
Protegopermissive · top 1,000 on PyPI
boltonspermissive · top 1,000 on PyPI