Why PyPi doesn't show download stats anymore?

PythonPypi

Python Problem Overview


It was so handy to get an idea if the package is popular or not (even if its popularity is the reason of some "import" case in another popular package). But now I don't see this info for some reason.

An example: https://pypi.python.org/pypi/blist

Why did they turn off this useful thing?

Python Solutions


Solution 1 - Python

I just released https://pepy.tech/ to view the downloads of a package. I used the data from BigQuery so you will get the same result :-)

Solution 2 - Python

As can be seen in this mail.python.org article, download stats were removed because they weren't updating and would be too difficult to fix.

Donald Stufft, the author of the article, listed these reasons:

> There are numerous reasons for their removal/deprecation some of which > are: > >* Technically hard to make work with the new CDN > - The CDN is being donated to the PSF, and the donated tier does not offer any form of log access > - The work around for not having log access would greatly reduce the utility of the CDN >* Highly inaccurate > - A number of things prevent the download counts from being inaccurate, some of which include: > - pip download cache > - Internal or unofficial mirrors > - Packages not hosted on PyPI (for comparisons sake) > - Mirrors or unofficial grab scripts causing inflated counts (Last I looked 25% of the downloads were from a known mirroring > script). >* Not particularly useful > - Just because a project has been downloaded a lot doesn't mean it's good > - Similarly just because a project hasn't been downloaded a lot doesn't mean it's bad

Solution 3 - Python

Recently I found out that you can query PyPI's Big Query database contributed to the PSF foundation through this link.

Also I wrote a blog post on how to fetch this info if you would like to take a look.

Solution 4 - Python

The pypinfo program is a Python3 command-line program to BigQuery installable via pip. If you set up the credentials (a JSON file) you should be able to write:

$ pypinfo -d 1825 blist year
Served from cache: False
Data processed: 250.31 GiB
Data billed: 250.31 GiB
Estimated cost: $1.23

| download_year | download_count |
| ------------- | -------------- |
|         2,017 |        443,067 |
|         2,016 |        391,816 |
|         2,018 |         57,689 |

Some information about the data collection is available at https://packaging.python.org/guides/analyzing-pypi-package-downloads/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiond-dView Question on Stackoverflow
Solution 1 - PythonpetrusquiView Answer on Stackoverflow
Solution 2 - PythonAaron ChristiansenView Answer on Stackoverflow
Solution 3 - Pythonuser378704View Answer on Stackoverflow
Solution 4 - PythonFinn Årup NielsenView Answer on Stackoverflow