--- id: redo version: "3.0.0" license: MPL-2.0 license_treatment: copyleft maintenance: active --- # redo — Utilities to retry Python callables. License: copyleft · Maintenance: active · Downloads: 1.0M/mo ## 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 above — 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 pip install redo uv add redo poetry add redo ## Installing 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: unspecified - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags retry decorator python, exponential backoff retry, async retry function, automatic retry with backoff, python retry utilities, retry context manager, configurable retry attempts, retry-logic, async-support, error-handling [View on SkillFed](https://skillfed.io/packages/redo) · [View on PyPI](https://pypi.org/project/redo/)