missing import in the readme ?

Thanks for your work :)
This commit is contained in:
Bruno Martin
2020-05-11 16:13:11 +02:00
committed by GitHub
parent 82b04f02af
commit 4d4656356d

View File

@@ -19,6 +19,7 @@ $ pip install slowapi
```python
from starlette.applications import Starlette
from slowapi import Limiter, _rate_limit_exceeded_handler
from slowapi.util import get_remote_address
limiter = Limiter(key_func=get_remote_address)
app = Starlette()
@@ -39,6 +40,7 @@ The above app will have a route `t1` that will accept up to 5 requests per minut
```python
from fastapi import FastAPI
from slowapi import Limiter, _rate_limit_exceeded_handler
from slowapi.util import get_remote_address
limiter = Limiter(key_func=get_remote_address)
app = FastAPI()