What problem does it solve?
Reduce outages and fragile behavior caused by transient network failures, intermittent service errors, and unbounded retry loops by providing clear patterns for retries, backoff, timeouts, and graceful degradation so production services remain responsive and observable.
Core Features & Use Cases
- Retry patterns: Use tenacity-based decorators for exception- and result-driven retries with exponential backoff and jitter.
- Timeouts and decorators: Provide reusable sync/async timeout decorators and composable infrastructure decorators for tracing, logging, and fail-safe defaults.
- Testability and observability: Encourage dependency injection, structured logging, and metrics to make retry behavior visible and easy to test.
- Use Case: Harden HTTP client calls to a third-party API with bounded retries, jittered backoff, retry-on-5xx/429 logic, and a fallback default for non-critical features.
Quick Start
Add retry with exponential backoff, jitter, and a 30 second overall timeout to the function that performs HTTP requests and log each retry attempt.