slowapi
A rate limiting extension for Starlette and Fastapi
Install
slowapi on PyPI
pip
pip install slowapiuv
uv add slowapipoetry
poetry add slowapiPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — limits |
| Maintenance | actively maintained — 61 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: slowapi-0.1.10-py3-none-any.whl
About slowapi
from the package's own PyPI description — quoted content, verbatim
SlowApi
A rate limiting library for Starlette and FastAPI adapted from flask-limiter.
This package is used in various production setups, handling millions of requests per month, and seems to behave as expected.
There might be some API changes when changing the code to be fully async, but we will notify users via appropriate semver version changes.
The documentation is on read the docs.
Quick start
Installation
slowapi is available from pypi so you can install it as usual:
$ pip install slowapi
Features
Most feature are coming from FlaskLimiter and the underlying limits.
Supported now:
- Single and multiple
limitdecorator on endpoint functions to apply limits - redis, memcached and memory backends to track your limits (memory as a fallback)
- support for sync and async HTTP endpoints
- Support for shared limits across a set of routes
- The library aims to support all currently supported versions of python
Limitations and known issues
- The...
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
SlowApi provides rate limiting for Starlette and FastAPI applications, wrapping the limits library to enforce request quotas on endpoints using decorators and configurable backends.
Low friction: pure Python wheel with a single runtime dependency (limits). Actively maintained with recent release 61 days ago and 2045 GitHub stars. Supports Python 3.7–3.13.
MIT license permits commercial and private use with minimal restrictions—suitable for most projects requiring only attribution.
Usage
pip install slowapi
from slowapi import Limiter
from slowapi.util import get_remote_address
from limits import storage
limiter = Limiter(key_func=get_remote_address)
@limiter.limit("5/minute")
async def endpoint(request):
return {"message": "success"}
The request parameter must be explicitly declared in the endpoint signature for rate limiting to work; websocket endpoints are not supported.
Verdict: SlowApi is a well-maintained, production-ready rate limiter with low install friction, permissive MIT licensing, and no known vulnerabilities. The single dependency (limits) and active maintenance make it a solid choice for adding request throttling to async web applications.
Needs verification
- Whether the in-memory backend is suitable for multi-process deployments or if Redis/Memcached is required for scaling.
- Performance characteristics and latency overhead of rate-limit checks under high request volumes.
- Current API stability status regarding promised async-related semver changes.
Similar packages
permissive · top 1,000 on PyPI
limitspermissive · top 1,000 on PyPI
opentelemetry-instrumentation-asgipermissive · top 1,000 on PyPI
opentelemetry-util-httppermissive · top 1,000 on PyPI
sse-starlettepermissive · top 1,000 on PyPI
gunicornpermissive · top 1,000 on PyPI
starlettepermissive · top 100 on PyPI
llama-cloudpermissive · top 1,000 on PyPI
poetry-corepermissive · top 1,000 on PyPI
freezegunpermissive · top 1,000 on PyPI