Skip to content
Tech News
← Back to articles

Backon – Python retry (zero deps, circuit breaker, async native)

read original more articles

backon

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

Zero dependencies — pure Python, stdlib only

— pure Python, stdlib only Four APIs — decorator ( @on_exception , @on_predicate ), functional ( retry() ), context manager ( Retrying ), callable ( RetryingCaller / AsyncRetryingCaller )

— decorator ( , ), functional ( ), context manager ( ), callable ( / ) Async native — same API works for async def functions

— same API works for functions Full type hints — validated with mypy, strict mode compatible

— validated with mypy, strict mode compatible Global toggle — backon.disable() / backon.enable() for testing

... continue reading