redo
Utilities to retry Python callables.
What it is and what it does
Redo is a retry utility library that wraps Python functions to automatically retry them on failure with configurable backoff strategies. It offers multiple integration points: plain functions (retry, retry_async), decorators (retriable, retriable_async), and a context manager (retrying) so you can choose the pattern that fits your codebase. Each retry attempt can be separated by a sleep interval that grows exponentially with optional random jitter to avoid thundering herd problems.
The package handles both synchronous and asynchronous callables, lets you specify which exceptions trigger a retry versus which should fail immediately, and supports optional cleanup functions between attempts. It has no runtime dependencies and supports Python 3.8 through 3.12, making it lightweight to add to existing projects.
Use it for:
- Wrap unreliable network requests with automatic retry and exponential backoff to handle transient failures gracefully.
- Decorate database operations that may fail due to temporary locks or connection issues, with configurable sleep between attempts.
- Use as a context manager around a block of code that needs retry logic without modifying the function definition itself.
- Retry async/await functions in concurrent applications with sleep callbacks tuned to your workload.
- Add retry capability to CLI tools or scripts that interact with flaky external services or resources.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Redo provides decorators, functions, and a context manager to automatically retry Python callables with exponential backoff, jitter, and configurable attempt limits.
Yes. Redo is a mature, dependency-free utility with active maintenance, no known vulnerabilities, and broad Python version support. It solves a common problem (retrying transient failures) with multiple clean integration patterns. The MPL-2.0 copyleft license is permissive for most use cases. Install it if you need retry logic and prefer a focused, lightweight tool over building your own.
Install
redo on PyPI
pip
pip install redouv
uv add redopoetry
poetry add redoInstalling redo
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 2026-08-04 with a recent release in 2024-07-17, supporting Python 3.8 through 3.12.
License in practice
Licensed under MPL-2.0 (copyleft). You must disclose source code modifications and distribute under the same license if you modify and redistribute the package, but can use it in proprietary applications without disclosing your own code.
Quickstart
pip install redo
from redo import retry
def unstable_action():
# raises Exception on failure
pass
result = retry(unstable_action, attempts=5, sleeptime=1, jitter=0)
Verify before relying
- Whether the package is actively maintained beyond the last commit date of 2026-08-04
- Performance characteristics when handling high-frequency retries or very large numbers of attempts
Package facts
| License | MPL-2.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 758 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,005,604/month — #4,528 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: redo-3.0.0-py2.py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
reretryA decorator and function wrapper for retrying…
permissive · top 15,000 on PyPI
retryProvides a decorator and function wrapper for…
permissive · top 1,000 on PyPI
retry2Provides a decorator and function wrapper to…
permissive · top 5,000 on PyPI
retryingRetrying is a decorator-based library that adds…
permissive · top 1,000 on PyPI
timeout-samplerPolls a function repeatedly within a timeout…
permissive · top 15,000 on PyPI
python-retryProvides a decorator to automatically retry…
permissive · top 15,000 on PyPI
python-backoffProvides function decorators for retrying…
permissive · top 5,000 on PyPI
backoffProvides function decorators to automatically…
permissive · top 1,000 on PyPI
waiterWaiter provides iteration-based retry and…
permissive · top 15,000 on PyPI
mo-kwargsProvides an `@override` decorator that lets you…
copyleft · top 15,000 on PyPI