slowapi
slowapi copied to clipboard
A rate limiter for Starlette and FastAPI
It looks like there was some work done a few years ago to pass `request` to a `is_exempt` handler here: https://github.com/laurentS/slowapi/blob/a72bcc66597f620f04bf5be3676e40ed308d3a6a/slowapi/wrappers.py#L48-L52 but the latest release is 0.1.9 which doesn't have...
**Describe the bug** The function _find_route_handler is not return the good route handler when using route with variable **To Reproduce** I have two route handler ``` @app.api_route("/health", include_in_schema=True) @limiter.exempt async...
Any plans on upgrading the optional dependency `redis`? It's currently 2 major versions behind the latest
At the moment I have a implantation with Fastapi that limits on the following endpoint: ``` @app.get("/v1/endpoint/{parameter}") @limiter.limit("60/minute") ``` This is generation limits for varous endpoints, like: ``` /v1/endpoint/a /v1/endpoint/b...
**Describe the bug** I implemented rate limiting with default values, so the storage being used is local memory and running uvicorn with 8 workers. For a end point with rate...
The current implementation of `_ASGIMiddlewareResponder` buffers the `http.response.start` message and delays sending it until the first `http.response.body` message. While this ordering adheres to the ASGI specification, it breaks streaming responses...
asyncio.iscoroutinefunction is being removed in Python 3.16 and is being marked as deprecated in 3.14. This fixes the deprecation warning and future breakage.
## Summary When applying `@limiter.limit` to a FastAPI route that uses `from __future__ import annotations` and `Annotated[..., Depends(...)]`, the decorator breaks dependency resolution if the endpoint does not explicitly declare...
Removed commented-out code related to app parameter.