$npx skillfedfor your agent

aiohttp-retry

Simple retry client for aiohttp

Worth itPyPI WWW/HTTPReleased Nov 202437.3M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aiohttp_retry-2.9.1-py3-none-any.whl
v2.9.1 · released 2024-11-06 · Python >=3.7 · 1 runtime deps: aiohttp

Yes. It is low-friction to install, actively maintained, has no known vulnerabilities, and solves a common problem in async HTTP clients. Use it if you need automatic retry logic for aiohttp; it is simpler than implementing retries manually. Be aware of the breaking API changes noted in versions 2.7.0–2.8.3 (yanked) and the parameter addition in 2.5.6 if you are upgrading from an older version.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or higher and an async context (asyncio event loop).
  • Low friction—pure Python wheel with a single runtime dependency on aiohttp.
  • Actively maintained as of 2024-11-06, with 273 repository stars and recent commits.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.

last release 2024-11-06 (646 days) · last repo commit 2026-04-08 · 273 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 37,263,239 downloads/mo, #727 on PyPI

Verify before relying

from aiohttp_retry import RetryClient, ExponentialRetry

async def main():
    retry_options = ExponentialRetry(attempts=3)
    async with RetryClient(retry_options=retry_options) as client:
        async with client.get('https://example.com') as response:
            print(response.status)
  • Whether the package handles connection pooling and session lifecycle the same way as bare aiohttp.ClientSession.
  • Performance overhead of retry logic compared to raw aiohttp requests.
  • Behavior when evaluate_response_callback is combined with raise_for_status=True.
Same gist for agents: .md · .json

What it is and what it does

aiohttp-retry is a thin wrapper around aiohttp's ClientSession that adds automatic retry logic for failed HTTP requests. It lets you define retry policies (how many attempts, which status codes or exceptions trigger a retry, and how long to wait between attempts) and applies them transparently to all requests made through the RetryClient. The package includes several built-in backoff strategies—exponential, random, Fibonacci, and jitter—and allows custom logic via callbacks to decide whether a response warrants a retry.

You use it by creating a RetryClient with your chosen RetryOptions, then call its methods (get, post, etc.) exactly as you would with aiohttp's ClientSession. By default it retries all 5xx server errors plus any statuses you specify, and can also retry on specific exceptions. The last request attempt always returns as-is; if it fails, that failure propagates to your code. It integrates with aiohttp's trace mechanism so you can log or monitor retry attempts.

Use it for

  • Retry transient 5xx errors from unreliable APIs without manual try-catch loops.
  • Implement exponential backoff for rate-limited endpoints to avoid hammering servers.
  • Handle temporary network glitches by retrying with jitter to prevent thundering herd.
  • Change request parameters (URL, headers) between retry attempts for fallback strategies.
  • Log or monitor retry attempts via aiohttp's trace config for observability.
  • Retry on custom response conditions (e.g., malformed JSON) using evaluate_response_callback.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

It is low-friction to install, actively maintained, has no known vulnerabilities, and solves a common problem in async HTTP clients. Use it if you need automatic retry logic for aiohttp; it is simpler than implementing retries manually. Be aware of the breaking API changes noted in versions 2.7.0–2.8.3 (yanked) and the parameter addition in 2.5.6 if you are upgrading from an older version.

Install

aiohttp-retry on PyPI

Before you install

Low friction—pure Python wheel with a single runtime dependency on aiohttp. Actively maintained as of 2024-11-06, with 273 repository stars and recent commits. No known vulnerabilities.

Requires Python 3.7 or higher and an async context (asyncio event loop).

License in practice

MIT license permits commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

from aiohttp_retry import RetryClient, ExponentialRetry

async def main():
    retry_options = ExponentialRetry(attempts=3)
    async with RetryClient(retry_options=retry_options) as client:
        async with client.get('https://example.com') as response:
            print(response.status)

Verify before relying

  • Whether the package handles connection pooling and session lifecycle the same way as bare aiohttp.ClientSession.
  • Performance overhead of retry logic compared to raw aiohttp requests.
  • Behavior when evaluate_response_callback is combined with raise_for_status=True.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
aiohttp
MaintenanceActively maintained 646 days since the last release
Last repo commit
First released
Downloads37,263,239 / month, #727 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: aiohttp_retry-2.9.1-py3-none-any.whl

Tags

Capabilities
aiohttp retry clientasync http request retryexponential backoff aiohttpautomatic http retry logicaiohttp error recoveryasync http resilienceretry decorator aiohttp
Topics
async-httpresiliencebackoff-strategy
PyPI keywords
aiohttpretryclient

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “aiohttp retry client”

  • aiohttp-retryWraps aiohttp's ClientSession to automatically retry failed HTTP…
  • aioresponsesMocks HTTP requests made by aiohttp's ClientSession for testing…
  • httpx-aiohttpProvides aiohttp-based transports for httpx, allowing httpx to use…

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also aiogithubapi · retry-requests · retry2 · python-retry · retrying · retry · reretry · retryhttp · httpx-retries · backoff