NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #536 most downloaded on PyPI
Simple retry client for aiohttp
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.2 years
Most releases are documented
notes for 21 of 30 stable releases
5 versions withdrawn
withdrawn after publishing
7 years old
35 releases · first in 2020
One column per quarter.
Add tests init file by @inyutin in #106
Retry based on HTTP methods by @inyutin in #103
Full Changelog: v2.8.3...v2.9.0
Fix infinite retries due to callback; add callback to `ListRetry`
Fix infinite retries due to callback; add callback to ListRetry
* fix redurant arguments due to 2.8.0
https://github.com/inyutin/aiohttp_retry/issues/79
https://github.com/inyutin/aiohttp_retry/issues/48 https://github.com/inyutin/aiohttp_retry/issues/38
https://github.com/inyutin/aiohttp_retry/issues/48 https://github.com/inyutin/aiohttp_retry/issues/38
Add a callback to evaluate response
Add a callback to evaluate response
Nothing published for this version
Add response as param to get_timeout https://github.com/inyutin/aiohttp_retry/issues/59
Add response as param to get_timeout https://github.com/inyutin/aiohttp_retry/issues/59
Improve logging https://github.com/inyutin/aiohttp_retry/issues/58
Improve logging https://github.com/inyutin/aiohttp_retry/issues/58
Make it possible to set up client session explicitly https://github.com/inyutin/aiohttp_retry/issues/60
Make it possible to set up client session explicitly https://github.com/inyutin/aiohttp_retry/issues/60
Add ClientType type to library `ClientType = Union[ClientSession, RetryClient]`
Add ClientType type to library
ClientType = Union[ClientSession, RetryClient]
Set python >= 3.7 as requirement in setup.py
Set python >= 3.7 as requirement in setup.py
Fix retries timeouts: https://github.com/inyutin/aiohttp_retry/pull/68
Fix retries timeouts: https://github.com/inyutin/aiohttp_retry/pull/68
Fix this issue: https://github.com/inyutin/aiohttp_retry/issues/42
Fix this issue: https://github.com/inyutin/aiohttp_retry/issues/42
Fix debug log, make it more accurate https://github.com/inyutin/aiohttp_retry/issues/54
Fix debug log, make it more accurate https://github.com/inyutin/aiohttp_retry/issues/54
Nothing published for this version
Nothing published for this version
https://github.com/inyutin/aiohttp_retry/issues/41
Nothing published for this version
Nothing published for this version
Related issues: https://github.com/inyutin/aiohttp_retry/issues/29
Related issues: https://github.com/inyutin/aiohttp_retry/issues/29
Discussion was here: https://github.com/inyutin/aiohttp_retry/pull/13
Discussion was here: https://github.com/inyutin/aiohttp_retry/pull/13
https://github.com/inyutin/aiohttp_retry/issues/23
Related issues:
https://github.com/inyutin/aiohttp_retry/issues/22
Related issues:
You can define your own timeouts logic or use:
You can define your own timeouts logic or use:
ExponentialRetry with exponential backoffRandomRetry for random backoffListRetry with backoff you predefine by listRetryClient add *current attempt number* to request_trace_ctx (for more info see aiohttp doc).
RetryClient add current attempt number to request_trace_ctx (for more info see aiohttp doc).
import logging
import sys
from types import SimpleNamespace
from aiohttp import ClientSession, TraceConfig, TraceRequestStartParams
from aiohttp_retry import RetryClient, RetryOptions
handler = logging.StreamHandler(sys.stdout)
logging.basicConfig(handlers=[handler])
logger = logging.getLogger(__name__)
retry_options = RetryOptions(attempts=2)
async def on_request_start(
session: ClientSession,
trace_config_ctx: SimpleNamespace,
params: TraceRequestStartParams,
) -> None:
current_attempt = trace_config_ctx.trace_request_ctx['current_attempt']
if retry_options.attempts <= current_attempt:
logger.warning('Wow! We are in last attempt')
async def main():
trace_config = TraceConfig()
trace_config.on_request_start.append(on_request_start)
retry_client = RetryClient(retry_options=retry_options, trace_configs=[trace_config])
response = await retry_client.get('https://httpstat.us/503', ssl=False)
print(response.status)
await retry_client.close()
```python from aiohttp_retry import RetryClient, RetryOptions
Make request awaitable:
from aiohttp_retry import RetryClient, RetryOptions
async def main():
retry_options = RetryOptions(attempts=1)
retry_client = RetryClient(raise_for_status=False, retry_options=retry_options)
response = await retry_client.get('/ping')
print(response.status)
await retry_client.close()
Rewrite working with retry options. Make it possible to specify retry options for RetryClient.
Rewrite working with retry options. Make it possible to specify retry options for RetryClient.
Nothing published for this version
Import Protocol from typing_extensions for python < 3.8 due to https://github.com/inyutin/aiohttp_retry/issues/7
Import Protocol from typing_extensions for python < 3.8 due to https://github.com/inyutin/aiohttp_retry/issues/7
Added log attempts to debug log due to https://github.com/inyutin/aiohttp_retry/issues/3.
Added log attempts to debug log due to https://github.com/inyutin/aiohttp_retry/issues/3.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →