httpx-retries
A retry layer for HTTPX.
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 on this page — 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
httpx-retries on PyPI
pip
pip install httpx-retriesuv
uv add httpx-retriespoetry
poetry add httpx-retriesInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — httpx |
| Maintenance | actively maintained — 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,714,169/month — #2,246 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: httpx_retries-0.6.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
httpx-aiohttpProvides aiohttp-based transports for httpx,…
unclear · top 5,000 on PyPI
httpx-socksAdds SOCKS4(a), SOCKS5(h), and HTTP CONNECT…
permissive · top 5,000 on PyPI
retryingRetrying is a decorator-based library that adds…
permissive · top 1,000 on PyPI
retry-requestsWraps requests Session objects to automatically…
copyleft · top 15,000 on PyPI
retryhttpRetryhttp wraps HTTP client calls to…
permissive · top 5,000 on PyPI
pytest-retrypytest-retry is a pytest plugin that…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-httpxAdds distributed tracing to HTTP requests made…
permissive · top 1,000 on PyPI
python-retryProvides a decorator to automatically retry…
permissive · top 15,000 on PyPI
aiohttp-retryWraps aiohttp's ClientSession to automatically…
permissive · top 1,000 on PyPI
elastic-transportProvides shared HTTP transport classes and…
permissive · top 1,000 on PyPI