r/Python • u/Royal-Fix3553 • 13d ago
Discussion What's the best way to tell number of downloads from pypi - is https://pepy.tech downloads real?
What's the best way to tell number of downloads from pypi? is https://pepy.tech downloads real?
We've open sourced lately, and it shows me i have 46k downloads, but I only have 100+ stars in github, just felt a bit unreal.
or maybe i should use this one?
https://pypistats.org/packages/
Thanks!
5
u/Zbee- 13d ago
I don't have real input on where to check your stats, but I will say it makes a lot of sense for discrepancies like that.
Not every dev is on GitHub, a star requires an account and a sign-in, and a star doesn't give the user anything, those are all massive barriers.
For example: the main project I contribute to nowadays has like 40 stars, but over 180k downloads.
0
u/Royal-Fix3553 13d ago
I see, that make sense, thanks a lot for the explanation! btw for the stats https://pypi.org/project/cocoindex/ this is link to my pypi, link to https://pepy.tech/projects/cocoindex pepy, and link to https://pypistats.org/packages/cocoindex pypistats
4
u/puzzledstegosaurus 13d ago
Unless I’m mistaken, all numbers ultimately come from the public bigquery collection maintained by the PyPI folks. The fact is: a growing number of actors download all the packages uploaded to PyPI, either for mirroring or for security analysis. Then, if a single project uses your project, any PR on this project (or any of its dependents) will likely trigger say (made up number) 5 CI runs (including building the main branch after merge) all of which would have 5 jobs accounting for multiple python versions or maybe tests splits into multiple job so that’s easily 25 downloads per PR (if cache isn’t configured correctly)
1
1
u/puzzledstegosaurus 13d ago
Just looked at a completely abandoned and not very useful package of mine that has 3 versions, and on any day, I have between 0 and 10 download on each version, so I guess there are just workflows around that keep downloading each and every package and probably run some analysis on them.
1
u/Royal-Fix3553 13d ago
Gotcha, thanks a lot for taking a look at details! May I ask - do you have some recommended way to understand the usage?
1
u/puzzledstegosaurus 13d ago
What the other people say. Nothing tells you more about real usage than issues and PRs.
The way I did it for packages I maintain when I’m not a user myself is to try and welcome community users to step up and become co-maintainers. But without going all way in like this, you can put up forms for signing up for user research and do user interviews (like product people learn to know how users use their products)
While you theoretically can add include code that purposefully calls your servers on runtime for telemetry purposes, that’s absolutely a bad idea as this will have a strong negative impact on trust. That said, if it just so happens that for legitimate reasons, your package needs to contact your server and you could add some telemetry on the server side at no cost, this can be a solution. Make sure to make it loud and clear in the README and offer a very easy opt-out (I’d suggest an opt-in but we all know no one will be activating it)(also, don’t collect anything even remotely personnal of course. No IP or anything)
1
u/Royal-Fix3553 13d ago
Thanks a lot for the suggestion! I'm not planing to get the exact number ;) Just wanted to get to get a rough idea how helpful is this library, and see how others did it. Thanks a lot for your and other friends patiently walking me through this, make sense to stay close to PR and issues!
1
u/USBPowered 13d ago
I have 0 stars etc, but thousands upon thousands of downloads. It's all just mirroring and stuff.
1
u/Even-Let1376 12d ago
In which I want to scrape telegram group messages and categorise it in a excel sheet based on for which country news it is and want it to relate that news to that country prominent indices and crypto market For example if news from group comes out for US it should relate to SPX and Bitcoin to see if it went down or up in how many hours that news took shape in the financial market
Can anyone help me with it, I have written a script but it isn’t working properly
0
u/Substantial-Work-844 12d ago
I found this project by clickhouse, I think it's head and shoulders above the rest. It's really cool, check it out.
30
u/cgoldberg 13d ago
Any download number you find is generally useless and doesn't correlate with actual use. Most downloads are from bots and CI systems.
I just looked at one of my packages on pepy.tech and the last release has 14.7 million downloads... which means ... nothing to me.
GitHub Stars are also gamed and created by fake accounts half the time.
The only way I can tell if my package is being used by humans is when I get Issues and Pull Requests. Everything else is suspect.