Function decoration for backoff and retry — modern, fast, zero dependencies.
backon is a modern evolution of backoff — a zero-dependency Python library for retry with exponential backoff. It provides decorator, functional, and context manager APIs for both sync and async code.
Table of Contents
Features
Installation
Quick Start
API Reference Decorators
Functional API
Context Manager
Callers
Wait Generators
Stop Conditions
Retry Conditions
Jitter
Handlers
Global Toggle
Async Support
Custom Sleep
Advanced Features Circuit Breaker
Hedging
Metrics
Testing Utilities
Trio Support
Retry Context Inspection
Dynamic Backoff
Hot Loop Detection
Retry Statistics
Operator Composition
Iterator API
Migrating from backoff
Contributing
License
Features
Zero dependencies — pure Python, stdlib only
Four APIs — decorator ( @on_exception , @on_predicate ), functional ( retry() ), context manager ( Retrying ), callable ( RetryingCaller / AsyncRetryingCaller )
Async native — same API works for…