limits
Rate limiting utilities
Install
limits on PyPI
pip
pip install limitsuv
uv add limitspoetry
poetry add limitsPackage 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
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.
Similar packages
permissive · top 1,000 on PyPI
mergedeeppermissive · top 1,000 on PyPI
pybreakerpermissive · top 1,000 on PyPI
threadpoolctlpermissive · top 1,000 on PyPI
slowapipermissive · top 1,000 on PyPI
smmappermissive · top 1,000 on PyPI
tqdmcopyleft · top 100 on PyPI
croniterpermissive · top 1,000 on PyPI
psutilpermissive · top 1,000 on PyPI
fakeredispermissive · top 1,000 on PyPI