--- id: aiohttp-retry version: "2.9.1" license: MIT license_treatment: permissive maintenance: active --- # aiohttp-retry — Simple retry client for aiohttp License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install aiohttp-retry uv add aiohttp-retry poetry add aiohttp-retry ## Description # Simple aiohttp retry client Python 3.7 or higher. **Install**: `pip install aiohttp-retry`. [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/inyutin) ### 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_timeout``` func called "response". If you have defined your own ```RetryOptions```, you should add this param into it. Issue about this: https://github.com/inyutin/aiohttp_retry/issues/59 ### Examples of usage: ```python 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():... ## AI interpretation — verify before relying Wraps aiohttp's ClientSession to automatically retry failed HTTP requests with configurable backoff strategies (exponential, random, Fibonacci, jitter) and custom retry logic. 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. [View on SkillFed](https://skillfed.io/packages/aiohttp-retry) · [View on PyPI](https://pypi.org/project/aiohttp-retry/)