Registry / http-networking / retry-async

retry-async

JSON →
library0.1.4pypypi✓ verified 82d ago

A lightweight Python library for retrying async functions with configurable backoff, jitter, and retry conditions. Supports both asyncio and trio. Current version: 0.1.4. Release cadence: intermittent.

pip install retry-async
INSTALL
IMPORT
SIG · RETRY-ASYNC
R
retry-async
http-networkingpythonv0.1.4
Install
1.5s avg
Import
Disk
15MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 1.5s
py 3.11
✓ —
✓ 1.6s
py 3.12
✓ —
✓ 1.5s
py 3.13
✓ —
✓ 1.5s
py 3.9
✕ build_error
✕ build_error
15MB installed
● package 15MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

retry
from retry_async import retry
from retry_async import retry_async

Decorator-based retry for async functions with exponential backoff.

import asyncio from retry_async import retry_async async def unreliable(): raise ValueError("Oops") @retry_async(max_tries=3, delay=1.0, backoff=2.0) async def main(): return await unreliable() if __name__ == '__main__': asyncio.run(main())
Debug
Known issues
gotchaThe decorator must be placed on a coroutine function; using it on a regular function will raise TypeError.
fix
Ensure the decorated function is async def.
affects: >=0.1.0
gotchaThe `max_tries` parameter includes the initial attempt, so max_tries=1 means no retry.
fix
Set max_tries to the total number of attempts (initial + retries).
affects: >=0.1.0
breakingIn version 0.1.0, the default backoff was linear, but changed to exponential in 0.1.1.
fix
If you relied on linear backoff, set backoff=1.0 explicitly.
affects: >=0.1.1
Upgrade
Version history
0.1.4latest on PyPI · released Jan 9, 2024
Audit
Dependencies
typing_extensionsoptionalUsed for compatibility with older Python versions
Agent activity
12 hits · last 30 days
node
12
Resources
retry-async — pip install retry-async · libregistry