$npx skillfedfor your agent

fastapi-limiter

A request rate limiter for fastapi

With conditionsPyPI WWW/HTTPReleased Feb 2026943.0K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — fastapi_limiter-0.2.0-py3-none-any.whl
v0.2.0 · released 2026-02-06 · Python <4,>=3.9 · 2 runtime deps: fastapi, pyrate-limiter

Yes, if you need straightforward per-route rate limiting in FastAPI. The low install friction, permissive license, and zero known vulnerabilities make it a safe choice. The aging maintenance status (189 days since last release) is a minor concern but not a blocker—the package is stable and the dependency chain is minimal. Install it if your use case fits the built-in features; consider alternatives if you need distributed rate limiting across multiple instances.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with only two runtime dependencies (fastapi and pyrate-limiter).
  • Maintenance status is aging—last release 189 days ago, though the repository remains active with 790 stars and no archived flag.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.

last release 2026-02-06 (189 days) · last repo commit 2026-02-06 · 790 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 942,954 downloads/mo, #4,673 on PyPI

Verify before relying

pip install fastapi-limiter

from fastapi import Depends, FastAPI
from pyrate_limiter import Duration, Limiter, Rate
from fastapi_limiter.depends import RateLimiter

app = FastAPI()

@app.get("/", dependencies=[Depends(RateLimiter(limiter=Limiter(Rate(2, Duration.SECOND * 5))))])
async def index():
    return {"msg": "Hello World"}
  • Whether the package supports distributed rate limiting across multiple application instances or only in-process limits.
  • Performance characteristics under high request volumes or with many concurrent limiters.
Same gist for agents: .md · .json

What it is and what it does

fastapi-limiter wraps pyrate-limiter to provide a FastAPI dependency that enforces request rate limits on individual routes. It identifies requests by IP and path by default, but supports custom identifiers like user ID. When a limit is exceeded, it raises an HTTP 429 response by default, though you can provide a custom callback. The package works with both REST endpoints and WebSocket connections, and allows stacking multiple limiters on a single route with different thresholds.

The package integrates directly into FastAPI's dependency injection system, so rate limiting is declared as a route parameter rather than middleware. It supports Python 3.9 through 3.14 and has no known security vulnerabilities. The aging maintenance status reflects infrequent releases, but the repository remains public and the dependency surface is minimal.

Use it for

  • Protect public API endpoints from abuse by limiting requests per IP to a fixed number per time window.
  • Implement tiered rate limits on a single route (e.g., 1 request per 5 seconds, then 2 per 15 seconds).
  • Rate-limit WebSocket connections by checking limits on each incoming message.
  • Skip rate limiting on specific routes using the skip_limiter decorator for whitelisted endpoints.
  • Customize rate limit identification by user ID, API key, or other request attributes instead of IP.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need straightforward per-route rate limiting in FastAPI.

The low install friction, permissive license, and zero known vulnerabilities make it a safe choice. The aging maintenance status (189 days since last release) is a minor concern but not a blocker—the package is stable and the dependency chain is minimal. Install it if your use case fits the built-in features; consider alternatives if you need distributed rate limiting across multiple instances.

Install

fastapi-limiter on PyPI

Before you install

Low friction install with only two runtime dependencies (fastapi and pyrate-limiter). Maintenance status is aging—last release 189 days ago, though the repository remains active with 790 stars and no archived flag.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install fastapi-limiter

from fastapi import Depends, FastAPI
from pyrate_limiter import Duration, Limiter, Rate
from fastapi_limiter.depends import RateLimiter

app = FastAPI()

@app.get("/", dependencies=[Depends(RateLimiter(limiter=Limiter(Rate(2, Duration.SECOND * 5))))])
async def index():
    return {"msg": "Hello World"}

Verify before relying

  • Whether the package supports distributed rate limiting across multiple application instances or only in-process limits.
  • Performance characteristics under high request volumes or with many concurrent limiters.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release <4,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
fastapipyrate-limiter
MaintenanceAging 189 days since the last release
Last repo commit
First released
Downloads942,954 / month, #4,673 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Evidence: fastapi_limiter-0.2.0-py3-none-any.whl

Tags

Capabilities
fastapi rate limitingrequest throttling fastapirate limiter dependencyhttp request limitingapi rate limiting toolfastapi route throttlewebsocket rate limiting
Topics
rate-limitingapi-protection
PyPI keywords
fastapilimiter

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “fastapi rate limiting”

  • fastapi-limiterAdds request rate limiting to FastAPI routes using configurable…
  • slowapiAdds rate limiting to Starlette and FastAPI endpoints using…
  • token-throttlerToken throttler implements rate limiting using a token bucket…

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also ratelimiter · requests-ratelimiter · httpxthrottlecache · django-ratelimit · pyrate-limiter · slowapi · python-redis-rate-limit · httpx-limiter · loop-rate-limiters · asgi-ratelimit