mirror of
https://github.com/laurentS/slowapi.git
synced 2026-03-13 09:10:20 +08:00
Add Request module
Added Request module for fastAPI example code. If the Request module is not added, an error is received when the code is executed.
This commit is contained in:
@@ -39,7 +39,7 @@ The above app will have a route `t1` that will accept up to 5 requests per minut
|
||||
## FastAPI
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
from fastapi import FastAPI, Request
|
||||
from slowapi import Limiter, _rate_limit_exceeded_handler
|
||||
from slowapi.util import get_remote_address
|
||||
from slowapi.errors import RateLimitExceeded
|
||||
|
||||
Reference in New Issue
Block a user