Registry / http-networking / eth-retry

eth-retry

JSON →
library0.3.7pypypiunverified

eth-retry provides a decorator that automatically catches known transient exceptions common in the Ethereum/EVM ecosystem (RPC errors, rate limits, timeouts) and retries the decorated function. Current version is 0.3.7, with an active release cadence. Requires Python >=3.10.

pip install eth-retry
INSTALL
IMPORT
SIG · ETH-RETRY
E
eth-retry
http-networkingpythonv0.3.7
Install
1.6s 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.3.7 · 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 · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

eth_retry
from eth_retry import eth_retry
from eth_retry import eth_retry

Basic usage of eth-retry for synchronous and asynchronous functions.

import os from eth_retry import eth_retry, eth_retry_async # Synchronous usage @eth_retry def fetch_balance(address: str) -> int: # Simulate RPC call that might fail return 100 result = fetch_balance('0x...') print(result) # Async usage @eth_retry_async async def fetch_balance_async(address: str) -> int: return 100 import asyncio asyncio.run(fetch_balance_async('0x...'))
Debug
Known issues
gotchaThe decorator only retries on specific known transient exceptions (e.g., RPC errors, rate limits, timeouts). Custom exceptions are not retried unless you use the `exceptions` parameter.
fix
If you need to retry on other exceptions, pass them via exceptions=[...] in the decorator.
affects: all
gotchaWhen using environment variables (e.g., ETH_RETRY_MAX_RETRIES), they are read at import time. Changes to environment variables after import will not affect behavior unless explicitly overridden in decorator kwargs.
fix
Set environment variables before importing eth_retry, or use decorator kwargs to override.
affects: all
breakingPython 3.8 and 3.9 are no longer supported as of v0.3.6. v0.3.5 was the last version with Python 3.8/3.9 support.
fix
Upgrade to Python 3.10+ or pin eth-retry to <=0.3.5.
affects: >=0.3.6
Upgrade
Version history
0.3.7latest on PyPI · released Jan 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
eth-retry — pip install eth-retry · libregistry