crflynn / pypistats.org

PyPI downloads analytics dashboard

Home Page:https://pypistats.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the difference between with and without mirror ?

funilrys opened this issue · comments

Hi @crflynn !

I'm asking the following because you globaly return the wihout_mirror as the number of download but what happens in my case ?

Shouldn't we sums the with and without mirror totals ?

2018-11-01-120953_1600x900_scrot

In some cases mirrors account for a large number of downloads. See here, which is using the same source data:

ofek/pypinfo#4 (comment)

ofek/pypinfo#4 (comment)

If you sum the with (a+b) and without (a) figures, you count the without figures twice (a+b+a).

commented

The with_mirrors and without_mirrors are not mutually exclusive sets of download counts like the other segmentations provided. In fact, the without_mirrors downloads are a subset of the downloads in with_mirrors.

Some entities will create a mirror, or clone, of the PyPI repository using a tool like bandersnatch for the sake of security or availability. This means that their mirror repository regularly syncs with PyPI by downloading all of the python packages available. Those downloads are recorded by PyPI with bandersnatch as the user-agent. pypistats.org filters downloads from known mirrors from the version and system segmentations on the website. You will see also that on days in which you release a new version of your package there will be many more downloads from mirrors, as active mirrors will sync with PyPI by downloading those new releases.

The existence of mirrors means that the downloads provided by PyPI and BigQuery add uncertainty to the actual usage of python packages. One might expect that mirrors will mask end-user downloads for more commonly used packages while simultaneously inflating the download counts of less common ones. We can't really be sure because the mirrors don't report subsequent downloads back to PyPI.

Downloads by mirrors are intentionally excluded from download breakdowns on pypistats.org because they do not represent end-users of the software. Instead, they serve as an alternative provider to other end-users on a separate (sometimes private) network.

We can, however, assume that PyPI serves a significant proportion of the python community's packaging downloads. Hopefully significant enough that the quantities provided here are relevant to package maintainers and representative of their users. There are other distributors like conda which also serve python packages, but their download data is not available like PyPI's as far as I'm aware, and thus are not incorporated in this website.

If you prefer to have download counts that include mirrors, I'm pretty sure that @hugovk 's pypistats package can provide that information.

Thanks for the clear statements @hugovk @crflynn.

Closing.