Skip to content
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

Flask Limiter Integration #576

Open
diogper opened this issue Oct 7, 2023 · 2 comments
Open

Flask Limiter Integration #576

diogper opened this issue Oct 7, 2023 · 2 comments
Labels
question Further information is requested

Comments

@diogper
Copy link

diogper commented Oct 7, 2023

Any advise on a working rate limiter for flask-restx?
I was trying to integrate flask-limiter in flask-restx, but apparently the recent versions require Flask>2.0.0 which becomes incompatible. I even tried using the version 1.5 which is the 1.x branch latest release, but for some reason I am unable to use the decorator for rate granularity, it only works with the default rate on the constructor. I assume this is because of the way requests are organized onto classes in flask-restx and not direct routes or blueprints like the native Flask.

Appreciate your time!
Thank you.

@diogper diogper added the question Further information is requested label Oct 7, 2023
@peter-doggart
Copy link
Contributor

Have you tried specifying the decorators for class-based views as detailed here?: https://flask-limiter.readthedocs.io/en/stable/recipes.html#rate-limiting-class-based-views

@diogper
Copy link
Author

diogper commented Oct 10, 2023

I actually did not. I will try that. Though it seems theres less flexibility with that approach.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants