skillfed

retry-requests

Make requests's sessions auto-retry on failure.

retry-requests v2.0.0 401.1K downloads/30d#6,931 on PyPI26
Copyleft license GPLv3+ Abandoned released

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-requests

uv

uv add retry-requests

poetry

poetry add retry-requests

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

http request retryrequests session auto-retryconnection error retryhttp 5xx retrytimeout retry requestsbackoff retry strategyresilient http client
http-resilienceretry-logic

More Python Modules packages