retry-requests
Make requests's sessions auto-retry on failure.
What it is and what it does
retry-requests is a thin wrapper around the requests library that configures a Session to automatically retry failed HTTP requests. It handles transient failures like connection errors, timeouts, and server errors (5XX responses by default), with configurable backoff between retries. The package provides a simple `retry()` function that returns a configured Session, plus convenience subclasses like TSession (with default timeout) and RSession (with automatic raise_for_status).
The package requires Python 3.6+ and depends only on requests and urllib3. It's straightforward to use: call `retry()` to get a Session with retry behavior, then use it like any normal requests Session. You can customize retry count and backoff factor, though the package has been unmaintained since May 2023.
Use it for:
- Stabilize web scraping or API client code against intermittent network failures without manual retry loops
- Add resilience to microservice calls that may temporarily fail due to transient server issues
- Reduce failed requests in data collection pipelines that hit occasionally unreliable endpoints
- Simplify client code for services with known flaky infrastructure by centralizing retry logic
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps requests Session objects to automatically retry failed HTTP requests due to connection errors, timeouts, and specific HTTP status codes (5XX by default) with configurable backoff.
Yes, with conditions. The package is simple, has low install friction, and solves a real problem for HTTP clients. However, it is abandoned (last commit May 2023) with no active maintenance, so use it only if you accept that bugs or incompatibilities with future requests versions will not be fixed. For new projects, consider whether a maintained alternative better fits your needs.
Install
retry-requests on PyPI
pip
pip install retry-requestsuv
uv add retry-requestspoetry
poetry add retry-requestsInstalling retry-requests
Before you install
Low install friction with only requests and urllib3 as runtime dependencies. Package is marked abandoned with last commit in May 2023, over 1174 days ago, so no active maintenance or bug fixes should be expected.
License in practice
GPLv3+ copyleft license means any code that links this package must also be licensed under a compatible copyleft license or made proprietary with appropriate legal review.
Quickstart
pip install retry-requests
from retry_requests import retry
my_session = retry()
my_session.get("http://foo.bar")
Requires Python 3.6 or later.
Verify before relying
- Whether the retry logic handles modern HTTP/2 or HTTP/3 connections correctly
- How the package behaves with requests' newer session features added since 2023
- Whether the backoff implementation matches current best practices for exponential backoff
Package facts
| License | GPLv3+ (copyleft) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, urllib3 |
| Maintenance | abandoned — 1,174 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 401,064/month — #6,931 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: retry_requests-2.0.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
aiohttp-retryWraps aiohttp's ClientSession to automatically…
permissive · top 1,000 on PyPI
enirisEniris is a Python driver for the Eniris API…
permissive · top 15,000 on PyPI
retryhttpRetryhttp wraps HTTP client calls to…
permissive · top 5,000 on PyPI
httpx-retriesAdds automatic request retry logic to HTTPX,…
permissive · top 5,000 on PyPI
python-retryProvides a decorator to automatically retry…
permissive · top 15,000 on PyPI
reretryA decorator and function wrapper for retrying…
permissive · top 15,000 on PyPI
staminaStamina wraps Tenacity to provide a…
permissive · top 5,000 on PyPI
eth-retryA decorator that automatically retries…
permissive · top 15,000 on PyPI
retryingRetrying is a decorator-based library that adds…
permissive · top 1,000 on PyPI
waiterWaiter provides iteration-based retry and…
permissive · top 15,000 on PyPI