--- id: retryhttp version: "1.5.0" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # retryhttp — Retry potentially transient HTTP errors in Python. License: permissive · Maintenance: active · Downloads: 4.4M/mo ## What it is and what it does Retryhttp is a decorator-based retry layer for Python HTTP clients that handles transient failures automatically. It extends tenacity with custom strategies for HTTP-specific errors: status codes 429, 500, 502, 503, 504, plus network errors and timeouts. The package natively supports requests, httpx, httpx2, and aiohttp, with sensible defaults for retry counts and backoff timing that you can fully customize. It solves the common problem of flaky HTTP calls in production by reducing boilerplate retry logic and applying proven strategies for each error type. You apply it as a simple decorator around any function that makes HTTP calls, and it handles the retry loop internally. The package depends on pydantic for configuration and tenacity for the underlying retry machinery, keeping the surface simple while leveraging a mature retry framework underneath. Use it for: - Wrap API calls to third-party services that occasionally rate-limit or return transient 5xx errors - Protect against temporary network blips and timeouts in microservice communication - Reduce manual retry logic in data-fetching scripts that hit flaky endpoints - Add resilience to web scraping tasks without rewriting error handling - Handle rate-limit responses (429) with appropriate backoff in batch processing jobs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Retryhttp wraps HTTP client calls to automatically retry transient failures like rate limits, server errors, network issues, and timeouts, using sensible defaults but fully customizable retry and wait strategies. Yes. Retryhttp is actively maintained, has no known vulnerabilities, low install friction, and solves a common production problem with a clean API. The Apache 2.0 license is permissive. Install it if you make HTTP calls that might fail transiently and want to avoid writing retry boilerplate. ## Install pip install retryhttp uv add retryhttp poetry add retryhttp ## Installing retryhttp Before you install: Low friction: pure Python wheel with only two runtime dependencies (pydantic and tenacity). Last release 53 days ago, active repository with recent commits, marked Production/Stable. License in practice: Apache License 2.0 is permissive; you can use, modify, and distribute retryhttp freely in commercial and private projects, provided you include a copy of the license and note any changes you make. Quickstart: pip install retryhttp from retryhttp import retry @retry def fetch(): # Make HTTP call with your preferred library # Retries on 429, 500, 502, 503, 504, network errors, timeouts pass Requires Python 3.10 or later. Requires one of the supported HTTP libraries (requests, httpx, httpx2, or aiohttp) to be installed separately. Verify before relying: - Default retry count and backoff timing specifics beyond the documented error types - Whether custom retry predicates can be defined for non-standard error conditions - Performance overhead of the decorator on high-volume request patterns ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags http retry decorator, automatic transient error retry, rate limit retry handler, http timeout retry logic, tenacity http wrapper, 429 500 502 503 504 retry, http resilience layer, http-resilience, decorator-pattern, transient-error-handling [View on SkillFed](https://skillfed.io/packages/retryhttp) · [View on PyPI](https://pypi.org/project/retryhttp/)