GithubHelp home page GithubHelp logo

evilpackages's People

Watchers

 avatar  avatar

evilpackages's Issues

Stat download subcommand does not respect etiquette of pypistats.org

Hi,

As I mentioned on Reddit, I was going to take a look at this. It took longer than I thought. :) While the diff works well when I tested it using the included stats.json file, I ran into a pretty big issue with the stats subcommand.

As far as I can tell, the current implementation of evilpackages stats does not respect the posted etiquette for pypistats.org:

If you plan on using the API to download historical data for every python package in the database (e.g. for some personal data exploration), DON'T. This website runs on limited resources and you will degrade the site performance by doing this. It will also take a very long time.

Because of this, fetching the stats does not work on my machine. It gives me a JSON error, which I traced back to a 429 Too Many Requests error and found the etiquette section on the website. The 429 response apparently doesn't have a body GRequests can convert into JSON. I tried this a few times and apparently more than a few dozen requests are throttled. (Arguably I shouldn't have run the script once I knew it wasn't respecting the etiquette, but the rate throttling seemed aggressive enough that it wouldn't cause any problems, and I would have shut it off had it started to download more than a few hundred packages.)

The alternative suggested by both PyPi Stats and PyPi itself is to instead use BigQuery's free tier to access the full dataset. This may actually be simpler than the current code, but would require the user to provide Google credentials and a new import to interface with BigQuery. I'd be willing to make this change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.