Back to Explore

alisaifee/limits

GitHub
1 watchersOpen source

Last release: 3 months ago

limits is a Python library for implementing rate limiting with multiple strategies (fixed window, moving window, and sliding window counter). It works in both sync and async code, and stores counters using backends like Redis, Memcached, MongoDB, or in-memory.

Project status

  • Actively maintained: Recent activity is evident from a latest upstream push on 2026-05-14, plus versioned updates up through 5.8.0 (2026-02-05).
  • Update cadence: After 5.7.0 (2026-02-03), 5.8.0 followed quickly (2026-02-05). Earlier, updates appear irregular but recurring, with gaps like 5.6.0 (2025-09-29) after 5.5.0 (2025-08-05), and a larger gap between 5.4.0 (2025-06-16) and 5.3.0 (2025-06-13).

AI summary generated 2 weeks ago

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 5.8.0

    3 months ago

    Release 5.8.0 is presented as a set of bug fixes around storage URI parsing and how Redis-related connection options are derived. It adds a shared storage URI parser to improve username/password handling, support IPv6-style host locators, and make Redis cluster configuration more compatible with explicit keyword arguments.

  • 5.7.0

    3 months ago

    Release 5.7.0 primarily relaxes the redis extra dependency constraint to allow redis versions less than 8. The code diff also includes functional changes in the MongoDB storage layer that are not mentioned in the release notes, plus several build and tooling adjustments.

  • 5.6.0

    8 months ago

    Release 5.6.0 primarily migrates the project’s development and build tooling from requirements.txt, pip-based workflows, and versioneer to pyproject.toml, uv, and hatch. CI and docs workflows were updated to use uv, and versioning is now handled by hatch-vcs. Several repository and packaging files were also removed or reworked to support the new build/versioning approach.

  • 5.5.0

    10 months ago

    Release 5.5.0 mainly relaxes dependency upper bounds to improve compatibility with newer releases of packaging, coredis, and redis. The code diff also includes updates to documentation build dependencies and changes to the test TLS configuration.

  • 5.4.0

    11 months ago

    Release 5.4.0 primarily expands parsing support so custom rate limit granularities can be extracted via limits.parse and limits.parse_many. It also updates CI to run compatibility checks against Redis 8.0.

    Features
  • 5.3.0

    11 months ago

    Release 5.3.0 includes a single bug fix related to expiring in-memory limits. The change addresses a race condition that could cause unexpired entries to be removed during expiration of in-memory moving window limits.

  • 5.2.0

    5/16/2025

    Release 5.2.0 fixes the sliding window counter clear behavior so the sliding window state is actually reset for Redis, Memcached, and in-memory storage. The implementation adds a dedicated storage hook for clearing sliding window keys and wires the strategy limiter clear flow to call it.

    Breaking
  • 4.8.0

    4/23/2025

    Release 4.8.0 primarily backports a feature to let developers customize the Redis key prefix via a constructor argument. The code changes also include refactors to the documentation benchmark UI and templates, which are not mentioned in the release notes.

    Features
  • 5.1.0

    4/23/2025

    Release 5.1.0’s notes document a single change: exposing the `key_prefix` constructor argument for all redis storage implementations. However, the included diff between 4.8.0 and 5.1.0 also shows multiple removals or renames in public API documentation and CI configuration that are not mentioned in the 5.1.0 release notes.

    Features
  • 5.0.0

    4/16/2025

    The provided diff for v5.0.0 only modifies the changelog file (HISTORY.rst), not application/library code. It primarily updates text for release presentation and adjusts the ordering/content of previously noted compatibility and performance items.