Closed orsinium closed 4 years ago
Looks like the API is being spammed right now by someone using python-requests
. I didn't design this application's infrastructure to scale to any degree but I'll look into what I can do to remedy this.
https://github.com/hugovk/pypistats uses requests, but then requests is the 4th most downloaded package.
Would it help to add a User-Agent?
Yeah, it could be anyone. However, it's a good reminder to set User-Agent. I've made an issue in my tool as well: https://github.com/dephell/dephell/issues/231
PR to add User-Agent: https://github.com/hugovk/pypistats/pull/65.
I've disabled the API for the time being. I don't have much time right now to try to resolve this but I don't want the service to be completely unusable for the community. The charts should be viewable for now at least.
Hi there! Obviously we're big consumers of pypistats.org at Shields.io (we use Shields.io
for user-agent) although based on the thread it doesn't sound like we're the ones causing the spam. Please let us know if we are though.
While shields makes up a majority of the requests it was not what caused this issue. It was an individual who was trying to scrape the entirety of the API.
I'll reiterate to whomever that individual is that it is basically free to get all of this information directly from BigQuery (and in only a few seconds of query time). I'll reactivatee the API in the near future. Sorry for the disruption of service.
PR to add User-Agent: hugovk/pypistats#65.
Merged and released in 0.7.0.
Don't die, please :heart: