# litl/backoff

Python library providing function decorators for configurable backoff and retry

Repository: https://github.com/litl/backoff
Canonical: https://ross.abutalabs.com/products/litl-backoff
Language: Python
License: MIT
License Family: permissive
Topics: python, retry, backoff, asyncio, asynchronous, synchronous, exceptions, retrying, decorators, exponential
Archived: true
Last push: 2024-05-02T21:50:08+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4495, "days_push": 853, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2694, forks 155 (observed 2026-08-28T04:07:11.139495+00:00)

## What it is
A Python library providing function decorators for configurable backoff and retry logic. It supports both synchronous functions and asyncio coroutines, retrying on specified exceptions with strategies like exponential backoff.

## Use cases
- retry failed HTTP requests with exponential backoff
- handle intermittent failures when calling external APIs
- poll a resource until content is available
- add retry logic to async coroutines
- give up after max tries or max time on flaky network calls

## When to choose
- you need decorator-based retry with configurable backoff strategies in Python
- you want the same retry semantics for sync and asyncio code
- you need give-up conditions like max_tries or max_time

## When to avoid
- you need circuit breaking or bulkhead patterns beyond simple retry
- you want retries based on response values rather than exceptions only
- you need a polyglot solution outside Python

## Facets
- artifact type: library
- maturity: stable
- function: middleware, error-handling
- domain: developer-tools, apis
- platform: python, cross-platform
- tags: retry, backoff, decorators, asyncio, exponential-backoff, resilience, automation

## Member repositories
- litl/backoff (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:11.139495+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:16:20.776349+00:00, confidence not recorded.
  - readme: https://github.com/litl/backoff (fetched 2026-08-28T04:07:11.139495+00:00, sha 8fbde1632ef4)
  - registry_pypi: https://pypi.org/pypi/backoff/json (fetched 2026-08-29T09:59:26.816154+00:00, sha 2a7ce7fab9fa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
