Skip to content

Added clarification about default config_filename in Limiter #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -56,6 +56,11 @@ You can always switch this during the lifetime of the limiter:
limiter.enabled = False
```

#### Note: config file is set to ".env" by default. Therefore, if you have a .env file setup for something else already, specify the config_filename parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only section using 4# - - use use 2## to keep it consistent?
Consider moving this lower, to line 74, to keep it near another customization

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe use a shorter section title, like "Using the config file" and set your comment above as the paragraph content?

```python
limiter = Limiter(key_func=get_remote_address, default_limits=["1/minute"], config_filename=".your_config_file")
```

## Use redis as backend for the limiter

```python