--- id: retry-decorator version: "1.1.1" license: MIT license_treatment: permissive maintenance: abandoned --- # retry-decorator — Retry Decorator License: permissive · Maintenance: abandoned · Downloads: 474.2K/mo ## What it is and what it does retry-decorator is a simple Python decorator that wraps a function to automatically retry it when an exception occurs. You decorate a function with @retry, specifying the exception type to catch, the number of attempts to make, and a delay between retries in seconds. If all retries are exhausted, the last exception is raised to the caller. The package has no runtime dependencies and works with both Python 2 and Python 3 according to its classifiers. However, the project is abandoned—the last release was in March 2020 and the last repository commit in December 2021—so it will not receive updates for compatibility issues or bug fixes. Use it for: - Wrap network requests that may fail transiently to automatically retry before giving up. - Decorate database queries or API calls that occasionally time out or return temporary errors. - Add resilience to file I/O operations that may fail due to temporary resource unavailability. - Simplify test fixtures that need to wait for a service to become ready before proceeding. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a decorator to automatically retry a function when it raises an exception, with configurable attempt limits and timeout intervals. No. The package is abandoned with no maintenance since 2021, and high install friction (source-only distribution). Modern Python projects should use the standard library's functools.wraps with explicit retry logic, or a maintained alternative like tenacity or backoff, which offer more features and active support. ## Install pip install retry-decorator uv add retry-decorator poetry add retry-decorator ## Installing retry-decorator Before you install: High install friction due to source distribution only. Package is abandoned—last release was 2020-03-10 and last commit 2021-12-11—so expect no maintenance response to issues or compatibility problems. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: from retry_decorator import retry @retry(Exception, tries=3, timeout_secs=0.1) def my_function(): # function body pass my_function() Verify before relying: - Whether the decorator works correctly with modern Python versions (classifiers claim Python 2 and 3 support, but no requires_python constraint is specified). - Whether timeout_secs parameter actually enforces a timeout or merely introduces a delay between retries. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 474.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags retry decorator, automatic retry on exception, function retry logic, retry with timeout, exception retry handler, error-handling, decorator [View on SkillFed](https://skillfed.io/packages/retry-decorator) · [View on PyPI](https://pypi.org/project/retry-decorator/)