diff --git a/docs/examples.md b/docs/examples.md index a72c297..ea052b7 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -55,3 +55,13 @@ You can always switch this during the lifetime of the limiter: ```python limiter.enabled = False ``` + +## Use redis as backend for the limiter + +```python +limiter = Limiter(key_func=get_remote_address, storage_uri="redis://:/n") +``` + +where the /n in the redis url is the database number. To use the default one, just drop the /n from the url. + +There are more examples in the [limits docs](https://limits.readthedocs.io/en/stable/storage.html) which is the library slowapi uses to manage storage.