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

API : Add a header for rate limiting #72

Open
Riduidel opened this issue Aug 21, 2024 · 1 comment
Open

API : Add a header for rate limiting #72

Riduidel opened this issue Aug 21, 2024 · 1 comment

Comments

@Riduidel
Copy link

I'm working on a project to get download infos for various platforms (https://github.com/Riduidel/aadarchi-technology-detector).
For this project, I scan pypistats result for ~ 300 packages.
It seems like it's enough for my ip to get rate limited. And that's perfectly ok.
However, is it possible to have an http header added in order for me to know how much request I can make, how long I'll have to wait, and so on?

@hugovk
Copy link
Contributor

hugovk commented Aug 22, 2024

If it helps to know, the limit is 5 per second and 30 per minute:

limiter = Limiter(app, key_func=get_remote_address, application_limits=["5 per second", "30 per minute"])

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

No branches or pull requests

2 participants