Closed jwodder closed 4 years ago
The rate limit is 5 per second, and 30 per minute.
https://github.com/crflynn/pypistats.org/pull/27/files#diff-f43b9ad708915ad0355ef66cbe7e7865R27
Put some delays in between calls to stay within the limit and you'll be fine.
Seems a little low, but OK. Limit worked-around.
I have a small script that queries the pypistats.org API to see how much my packages have been downloaded lately. It makes one request to
/api/packages/:project/recent
per project, and I only have eighteen projects. I usually only run it once every couple of weeks. However, the past few weeks, running it fails with a "429 TOO MANY REQUESTS" error somewhere in the middle of the project list. My best guess at an explanation is that some form of API rate-limiting was implemented after #20, but the limit seems set too low. What can I do to get my script working again?