Registry / http-networking / python-retry

python-retry

JSON →
library0.0.1pypypi✓ verified 82d ago

A simple, lightweight Python package for retrying operations with configurable retry counts, delays, and backoff strategies. Version 0.0.1 is the initial release, with minimal API surface and basic functionality. The package is in early development with slow release cadence.

pip install python-retry
INSTALL
IMPORT
SIG · PYTHON-RETRY
P
python-retry
http-networkingpythonv0.0.1
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.1 · 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
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

retry
from python_retry import retry
from retry import retry

Decorate a function to retry up to 3 times with exponential backoff.

from retry import retry @retry(count=3, delay=1, backoff=2) def unstable_call(): import random if random.random() < 0.7: raise ValueError("transient error") return "success" print(unstable_call())
Debug
Known issues
gotchaThe @retry decorator does not catch exceptions by default; it only retries on exceptions that inherit from Exception. If your function raises BaseException directly (e.g., SystemExit), it will not be retried.
fix
Ensure your functions raise Exception subclasses, or use the 'exceptions' parameter to specify custom exception types.
affects: all
gotchaThe backoff parameter is multiplicative, not additive. For example, with delay=1 and backoff=2, delays are 1, 2, 4 seconds. Users often expect additive backoff (e.g., 1, 2, 3).
fix
Set backoff=1 for constant delay; otherwise, calculate expected delays accordingly.
affects: all
Upgrade
Version history
0.0.1latest on PyPI · released Mar 11, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
python-retry — pip install python-retry · libregistry