Package in PyPI suddenly getting huge increase in downloads?

Hi all,

I have a strange problem. I have a package in PyPI which started getting exponential growth in the amount of downloads. The typical amount downloads would be from 20 to 40 per day, but the downloads for the last three days have been:

2023-03-15: 273
2023-03-16: 1591
2023-03-17: 5402

Since basically all of them are from Windows OS (sudden change in the ratio of OS:es used), I am suspecting there is some sort of bug somewhere, but I don’t know where.

Does anyone here know how would I debug this? Can I see if the downloads are from same source?

I would not mind my package being this popular, but I suspect there is something else going on. The downside of this is that it distorts the download statistics shown on pypistats, pepy and on the project GitHub page making it look more popular than it is…

Not only are all the downloads from Windows, but they’re all on Python 3.11. I thought perhaps some very specific package/application started requiring your package as a dependency only on Windows and Python 3.11+, but extensive Googling and searching on GItHub, I see no plausible hits anyway. Therefore, it seems this is either some very weird glitch/issue, or it started being required by some sysadmin on a large chunk of internal Windows clients/servers all running Python 3.11—but even then, that would typically be served from a local wheelhouse or cache especially for a deployment of that size. I also suspected maybe something CI-related but it seems CI would be the last thing that would need wakepy, especially on Windows only.

@dustin any chance you can check into this?

1 Like

This projects lists wakepy as a dependency but only via installation instructions and the project itself only supports being installed via git clone, so you would never see it in dependency metadata: GitHub - davlee1972/upscale_video: Upscales Video 2x or 4x using AI

However it does not support Python 3.11 so seems a fairly unlikely culprit, perhaps though these instructions come from or have made it in to other projects that are private.

Other than digging into our public BigQuery dataset, I don’t have any additional insight.

Note that there are some other projects with direct/indirect dependencies on this though:

1 Like

Thanks for your replies! I checked the and there was no package using wakepy which would have such amount of downloads. Downloads for GitHub projects (requirements.txt) are harder to track…

Now the downloads dropped back to normal, so I guess it was just some sort of one-time run needing lots of resources :slight_smile: – if there are no other packages with similar sudden spikes at pypistats / pepy I might then just assume that the stats are real.

FWIW, I’d checked a few of the packages I maintain, some with a little over 30 downloads/month, some with >3 million downloads/month, and I didn’t see any spike. It’s quite the mystery, for sure.

1 Like

Eh, local wheelhouse or cache seems unlikely to me. If it works, it’ll get rolled out, and the CDN bears the weight of the effort.

I would bet on some corporation deploying an app across their network that is doing the venv/pip install dance (rather than bundling everything in a ready-to-use package). Or possibly spinning up a compute cluster.

Congrats on making a useful project, I suppose :smiley: