retry2
Easy to use retry decorator.
Decision gist · record as of 2026-08-14
Yes, if you need straightforward retry logic with minimal dependencies. The low install friction, permissive license, and zero known vulnerabilities make it safe to adopt. However, the dormant maintenance status (last release 2023-01-11) means you should verify it handles your specific exception types and retry patterns before relying on it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with a single optional runtime dependency (decorator).
- Maintenance is dormant—last release was 2023-01-11 and the repository has not been updated since 2024-07-10, though it remains unarchived and carries no known vulnerabilities.
License · maintenance · safety
Apache License 2.0 (permissive) — Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2023-01-11 (1311 days) · last repo commit 2024-07-10 · 30 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,237,076 downloads/mo, #3,195 on PyPI
Alternatives
Verify before relying
pip install retry2
from retry2 import retry
@retry(exceptions=ValueError, tries=3, delay=1)
def my_function():
pass
my_function()- Whether the package's dormant maintenance status affects its suitability for new projects or production use.
- How well the package's retry semantics integrate with modern async/await patterns.
- Whether the optional decorator dependency is required for your use case or only for signature preservation.
What it is and what it does
retry2 is a decorator-based retry library that wraps function calls to automatically re-execute them when they fail with specified exceptions. It lets you configure the number of attempts, delay between retries, exponential backoff multipliers, random jitter, and optional logging of failures. The package is a maintained fork of an unmaintained original and aims to keep retry logic simple and dependency-light.
You use it by decorating a function with @retry() and specifying which exceptions to catch, how many times to try, and how long to wait between attempts. It also provides a retry_call() function for cases where you need to apply retry logic dynamically rather than at definition time. The library preserves original tracebacks for debugging and can optionally use decorator to preserve function signatures.
Use it for
- Wrap API calls to handle transient network failures with exponential backoff.
- Retry database operations that may fail due to temporary locks or connection issues.
- Implement resilience in web scraping or data-fetching tasks with configurable delays.
- Add retry logic to background jobs or scheduled tasks without rewriting the function.
- Dynamically adjust retry behavior at runtime using retry_call() based on application state.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need straightforward retry logic with minimal dependencies.
The low install friction, permissive license, and zero known vulnerabilities make it safe to adopt. However, the dormant maintenance status (last release 2023-01-11) means you should verify it handles your specific exception types and retry patterns before relying on it in production.
Install
retry2 on PyPI
Before you install
Low friction: pure Python wheel with a single optional runtime dependency (decorator). Maintenance is dormant—last release was 2023-01-11 and the repository has not been updated since 2024-07-10, though it remains unarchived and carries no known vulnerabilities.
License in practice
Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install retry2
from retry2 import retry
@retry(exceptions=ValueError, tries=3, delay=1)
def my_function():
pass
my_function()
Verify before relying
- Whether the package's dormant maintenance status affects its suitability for new projects or production use.
- How well the package's retry semantics integrate with modern async/await patterns.
- Whether the optional decorator dependency is required for your use case or only for signature preservation.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Supports the current Python release >=2.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedecorator |
| Maintenance | Dormant 1,311 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,237,076 / month, #3,195 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | 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 :: Implementation :: PyPyTopic :: Software Development |
Evidence: retry2-0.9.5-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “function retry wrapper”
- retry2Provides a decorator and function wrapper to automatically retry…
- python-retryProvides a decorator to automatically retry failed function calls…
- retryProvides a decorator and function wrapper for retrying failed…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also awsretry · reretry · retry · retry-decorator · backoff-utils · aiohttp-retry · python-retry · backoff · python-backoff · redo