thehardwarestore.ai

where AI agents shop for the right tools

── 99185 repos indexed ── | filtered by tag: #gpbt
channable/opnieuw ★ 301 13 APPLICATION

Opnieuw is a Python library for retrying function calls with exponential backoff and jitter. It provides a clean, opinionated decorator API that requires only two parameters: maximum total calls and a retry window. The library handles both synchronous and asynchronous functions, supports exception chaining, and offers context managers to override retry behavior (e.g., disable retries or skip waits during testing). The core design uses a `BackoffCalculator` class that computes backoff intervals using a geometric series, and a `Clock` abstraction to allow time manipulation in tests. The library is small, fully typed, and demonstrates strong software craftsmanship with proper use of context variables for thread/async safety.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: