skillfed

limits

Rate limiting utilities

limits Permissive license MIT Active 642 v5.8.0 released

Install

limits on PyPI

pip

pip install limits

uv

uv add limits

poetry

poetry add limits

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — deprecated, packaging, typing-extensions
Maintenance actively maintained — 189 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: limits-5.8.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: OS IndependentOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

About limits

from the package's own PyPI description — quoted content, verbatim

.. |ci| image:: https://github.com/alisaifee/limits/actions/workflows/main.yml/badge.svg?branch=master :target: https://github.com/alisaifee/limits/actions?query=branch%3Amaster+workflow%3ACI .. |codecov| image:: https://codecov.io/gh/alisaifee/limits/branch/master/graph/badge.svg :target: https://codecov.io/gh/alisaifee/limits .. |pypi| image:: https://img.shields.io/pypi/v/limits.svg?style=flat-square :target: https://pypi.python.org/pypi/limits .. |pypi-versions| image:: https://img.shields.io/pypi/pyversions/limits?style=flat-square :target: https://pypi.python.org/pypi/limits .. |license| image:: https://img.shields.io/pypi/l/limits.svg?style=flat-square :target: https://pypi.python.org/pypi/limits .. |docs| image:: https://readthedocs.org/projects/limits/badge/?version=latest :target: https://limits.readthedocs.org

limits

|docs| |ci| |codecov| |pypi| |pypi-versions| |license|

limits is a python library for rate limiting via multiple strategies with commonly used storage backends (Redis, Memcached & MongoDB).

The library provides identical APIs for use in sync and async <https://limits.readthedocs.io/en/stable/async.html>_...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Implements rate limiting with multiple strategies (fixed window, moving window, sliding window counter) and storage backends (Redis, Memcached, MongoDB, in-memory) for both sync and async Python applications.

Low friction: pure-wheel distribution with only three lightweight runtime dependencies (deprecated, packaging, typing-extensions). Actively maintained with last commit 2026-08-05 and 642 GitHub stars.

MIT license (permissive) allows unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.

Usage

from limits import storage, strategies, parse
backend = storage.MemoryStorage()
strategy = strategies.MovingWindowRateLimiter(backend)
limit = parse("10/minute")
if strategy.hit(limit, "namespace", "key"):
    print("Request allowed")
else:
    print("Rate limit exceeded")

Requires Python 3.10 or later. For Redis/Memcached/MongoDB backends, the respective client library and server must be configured separately.

Verdict: Production-ready rate limiting library with solid maintenance, permissive licensing, and low install friction. Supports multiple strategies and backends suitable for both simple and distributed rate-limiting scenarios. No known vulnerabilities.

Needs verification

  • Whether in-memory storage is suitable for production multi-process deployments or if distributed backends are required for reliability.
  • Performance characteristics and memory overhead of each strategy under high-throughput conditions.
  • Whether async support covers all three strategies and all storage backends equally.
rate limiting libraryrequest throttlingapi rate limiterredis rate limitingasync rate limiterdistributed rate limitingquota management

Similar packages