skillfed

justbackoff

Simple backoff algorithm in Python

justbackoff v0.6.0 80.9K downloads/30d#14,262 on PyPI4
Permissive license MIT Abandoned released

What it is and what it does

justbackoff is a simple exponential backoff counter for Python. It manages retry delays by starting at a minimum duration (in milliseconds), multiplying by a factor after each call to duration(), and capping at a maximum. The counter resets on demand. Optional jitter adds randomness to avoid thundering-herd problems in concurrent retry scenarios.

The package has no runtime dependencies and is designed for straightforward integration into retry loops—particularly useful for network reconnection attempts or other transient failure handling. It is a direct port of a Go backoff library.

Use it for:

  • Implement exponential backoff in socket reconnection loops to handle temporary network failures gracefully.
  • Add jitter to retry delays in distributed systems to prevent synchronized retry storms across multiple clients.
  • Calculate progressive wait times for API rate-limit handling or database connection retries.
  • Build custom retry logic for transient failures in web scraping or polling tasks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements exponential backoff with optional jitter for retry logic, returning successive wait durations that grow by a configurable factor until reaching a maximum.

No. The package is abandoned (last commit 2024-05-07, repository archived) with no active maintenance. While the code is simple and permissively licensed, there will be no security updates or bug fixes. For new projects, prefer an actively maintained backoff library; for existing code already using justbackoff, consider migrating if you need ongoing support.

Install

justbackoff on PyPI

pip

pip install justbackoff

uv

uv add justbackoff

poetry

poetry add justbackoff

Installing justbackoff

Before you install

Low friction to install. However, the package is abandoned—last commit was 2024-05-07 and the repository is archived. No active maintenance or security updates should be expected.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.

Quickstart

from justbackoff import Backoff

b = Backoff(min_ms=100, max_ms=10000, factor=2, jitter=False)
print(b.duration())  # 0.1
print(b.duration())  # 0.2
b.reset()
print(b.duration())  # 0.1

Verify before relying

  • Whether the package works reliably on Python versions beyond 3.8, given the classifier list stops there and the project is no longer maintained.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,295 days since the last release
Last repo commit (repository archived)
First released
Downloads 80,930/month — #14,262 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: justbackoff-0.6.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

exponential backoff algorithmretry delay calculationbackoff with jitterconnection retry timingprogressive wait durationbackoff counterretry strategy
retry-logicnetworking

More Python Modules packages