aiohttp-retry
Simple retry client for aiohttp
Install
aiohttp-retry on PyPI
pip
pip install aiohttp-retryuv
uv add aiohttp-retrypoetry
poetry add aiohttp-retryPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — aiohttp |
| Maintenance | actively maintained — 645 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: aiohttp_retry-2.9.1-py3-none-any.whl
Keywords: aiohttp, retry, client
About aiohttp-retry
from the package's own PyPI description — quoted content, verbatim
Simple aiohttp retry client
Python 3.7 or higher.
Install: pip install aiohttp-retry.
Breaking API changes
-
Everything between [2.7.0 - 2.8.3) is yanked.
There is a bug with evaluate_response_callback, it led to infinite retries -
2.8.0 is incorrect and yanked. https://github.com/inyutin/aiohttp_retry/issues/79
-
Since 2.5.6 this is a new parameter in
get_timeoutfunc called "response".
If you have defined your ownRetryOptions, you should add this param into it. Issue about this: https://github.com/inyutin/aiohttp_retry/issues/59
Examples of usage:
from aiohttp_retry import RetryClient, ExponentialRetry
async def main():
retry_options = ExponentialRetry(attempts=1)
retry_client = RetryClient(raise_for_status=False, retry_options=retry_options)
async with retry_client.get('https://ya.ru') as response:
print(response.status)
await retry_client.close()
```python from aiohttp import ClientSession from aiohttp_retry import RetryClient
async def main():...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Wraps aiohttp's ClientSession to automatically retry failed HTTP requests with configurable backoff strategies (exponential, random, Fibonacci, jitter) and custom retry logic.
Installs cleanly with a single dependency on aiohttp. Actively maintained with a recent release (2024-11-06) and no reported vulnerabilities. Repository shows steady engagement (273 stars, last commit 2026-04-08).
MIT license permits commercial and private use with minimal restrictions—include a copy of the license and you're free to use, modify, and distribute.
Usage
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)
Requires Python 3.7 or higher and an async runtime (asyncio event loop).
Verdict: A lightweight, well-maintained retry wrapper for aiohttp with no security issues and permissive licensing. Low install friction and active development make it a solid choice for adding resilience to async HTTP clients. Note: versions 2.7.0–2.8.3 were yanked due to a retry-loop bug; use 2.9.1 or later.
Needs verification
- Whether the package's trace-context injection and custom retry callbacks work reliably in high-concurrency scenarios.
- Performance impact of retry logic on large numbers of concurrent requests.
Similar packages
permissive · top 1,000 on PyPI
retrypermissive · top 1,000 on PyPI
azure-coreunclear · top 1,000 on PyPI
tenacitypermissive · top 100 on PyPI
backoffpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-aiohttp-clientpermissive · top 1,000 on PyPI
aiosignalpermissive · top 100 on PyPI
aiohttppermissive · top 100 on PyPI
pg8000permissive · top 1,000 on PyPI
azure-storage-file-datalakepermissive · top 1,000 on PyPI