--- id: httpx-retries version: "0.6.0" license: unclear license_treatment: permissive maintenance: active --- # httpx-retries — A retry layer for HTTPX. License: permissive · Maintenance: active · Downloads: 4.7M/mo ## What it is and what it does httpx-retries wraps HTTPX's transport layer to automatically retry failed requests with configurable backoff strategies. It's designed to handle flaky and unreliable APIs by retrying on transient failures, similar to urllib3's Retry utility but built for HTTPX's sync and async clients. The package provides sensible defaults for simple use cases (just wrap your client with RetryTransport) and a Retry configuration object for customizing total retry count, backoff factor, and backoff strategy. The library is in Beta status and supports Python 3.10 through 3.14. It depends only on httpx and installs as a pure Python wheel. One known limitation: errors that occur while reading the response body (such as ReadTimeout mid-download) happen after the transport returns, so they cannot be retried by the transport itself—the package provides separate helper functions for that case. Use it for: - Wrap an HTTPX client with default retry behavior to handle transient network failures without custom logic. - Configure a Retry policy with specific backoff and total retry limits for APIs known to be flaky. - Use async retry transport with AsyncClient for concurrent requests that need resilience to temporary failures. - Migrate from requests + urllib3 Retry to HTTPX with minimal API changes using the compatible Retry configuration. - Build a resilient scraper or data-fetching service that retries on connection timeouts and transient errors. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds automatic request retry logic to HTTPX, with configurable backoff strategies and support for both sync and async clients. Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a common problem (request retry) in a way that mirrors familiar patterns from urllib3 and requests. The MIT license imposes no restrictions. Install it if you use HTTPX and need retry behavior; the defaults work out of the box. ## Install pip install httpx-retries uv add httpx-retries poetry add httpx-retries ## Installing httpx-retries Before you install: Low friction: pure Python wheel, single runtime dependency on httpx. Active maintenance with recent release (39 days ago) and steady repository activity. License in practice: MIT license (permissive); no restrictions on commercial or private use. Quickstart: pip install httpx-retries import httpx from httpx_retries import RetryTransport with httpx.Client(transport=RetryTransport()) as client: response = client.get("https://example.com") Requires Python 3.10 or later; httpx must be installed separately. Verify before relying: - Whether ReadTimeout errors during response body download are handled by the retry_request / aretry_request helpers mentioned in the docs. - Performance overhead of the retry transport compared to raw httpx under normal (non-failure) conditions. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags httpx retry transport, http request retry layer, automatic retry with backoff, flaky api retry handler, httpx resilience, async http retry, configurable request retries, http-client, resilience, async-support [View on SkillFed](https://skillfed.io/packages/httpx-retries) · [View on PyPI](https://pypi.org/project/httpx-retries/)