_ _ _
/_//_' /_//_/
/ / _/
__/_ _ _/_ _
_\ / /_|/ _\
pepy-stats
is a repository that, on a daily schedule at approximately 8 AM UTC:
- Fetches total download statistics from PePy for a few Python packages on PyPi, and
- Publishes those statistics to various webpages like this.
The purpose of this software is to make customizable Shields badges possible with download statistics from PePy.
Unfortunately, the badge offered by PePy is not highly customizable. Even after recent updates following a GitHub issue I opened. And Shield's badge doesn't offer total downloads. Only daily, weekly, and monthly are available. 😏 This is irksome for me, as I enjoy customizing markdown documents with Shields badges using consistent colors, styles, and logos! 🎨
If anyone finds themselves in a similar predicament as me regarding the lack of badges that combine total downloads + customizability, but don't feel like building their own mini-service for hosting download statistics, then open an issue. I totally get it! 😃 I'll happily add your Python package and host those statistics for you. If you like, open a pull request which updates this line with your package name in the CLI command! 😎
You may also install pepy-stats
yourself using the following command if you prefer to host statistics yourself!
pip install "git+https://github.com/michaelthomasletts/pepy-stats.git"
If you're wondering why this project isn't indexed on PyPi, that's because the name of this package is too similar to other projects already on PyPi (and I'm too lazy to change it)! 😬 Sorry -- you will need to install it from git
instead!
pepy-stats
includes a CLI! 😎 Just install the package and you're good to go. In the below example, we pretend abcd1234
is an API key for illustrative purposes.
# Fetch stats for one package
pepy-stats boto3-refresh-session -k abcd1234
# Multiple packages, custom folder, no abbreviation
pepy-stats boto3-refresh-session uv requests -k abcd1234 -o ~/Desktop -no-a
So you successfully added your Python package(s) to this repository or installed the CLI and published some total download statistics to wherever you're hosting them. Great! But now what . . . ?
Well, the total download statistics collected by this repository are published to a webpage, which can be found using the below URL pattern.
https://michaelthomasletts.github.io/pepy-stats/<package name>.json
.
If you are self-hosting statistics then, of course, I cannot help you with what your URL pattern will look like 😬 . . . but I digress . . .
Anyway, the markdown for creating a Shields badge using one of those URLs may look something like this:
[](https://pepy.tech/projects/boto3-refresh-session)
Which, using the above markdown code, returns a Shields badge like this:
But with a little magic . . . 🪄
[](https://pepy.tech/projects/boto3-refresh-session)
We could get something like this! 😌