skillfed

retry

Easy to use retry decorator.

retry Permissive license Apache License 2.0 DORMANT 758 v0.9.2 released

Install

retry on PyPI

pip

pip install retry

uv

uv add retry

poetry

poetry add retry

Package 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development

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
retry decoratorautomatic retry logicexponential backoffexception retry handlerfunction retry wrapperretry with delayconfigurable retry attempts

Similar packages