pypi-tracker
pypi-tracker is a lightweight tool for collecting and preserving PyPI package download statistics. It maintains historical data beyond PyPIStats' retention window. It generates static, chart-ready JSON reports that can be used to visualize download trends, track package adoption, and power dashboards or other applications without a backend.
Try it
pip install pypi-tracker
pypi-tracker sync --package dj-control-room
You now have the full history in data/dj-control-room.csv and reports in
public/packages/dj-control-room/, such as last-30-days.json:
{
"package": "dj-control-room",
"report": "last-30-days",
"as_of": "2026-11-01",
"downloads": 38071,
"complete": true,
"observations": [
{"date": "2026-10-03", "downloads": 510},
{"date": "2026-10-04", "downloads": 757}
]
}
The observations list has one entry per day in the window (shortened here). A day with no data is null,
never 0, and complete tells you whether any day is missing.
Commands
| Command | What it does |
|---|---|
init |
Creates a starter config file. |
sync |
Runs collect, then build. This is the one to schedule. |
collect |
Fetches new data from PyPIStats and merges it into the CSVs. |
build |
Writes the JSON report files to publish. |
validate |
Checks the CSVs for bad data and missing dates. |
Tracking several packages
You will typically want to keep a config file where you specify the packages you want to track.
pypi-tracker init # generates a new pypi-tracker.toml file in the current directory
A complete config file will have the sections seen below. Note that the pypi-tracker also
allows for cli args that can supersede these config values; though typically it is much
easier to simply rely on a config file.
# pypi-tracker.toml
packages = [
"dj-control-room",
"dj-control-room-base",
"dj-redis-panel",
"dj-cache-panel",
"dj-celery-panel",
"dj-urls-panel",
"dj-signals-panel",
]
[reports]
rolling_days = [7, 30, 90, 180]
calendar = ["weekly", "monthly", "yearly"]
historical = ["daily"]
summary = true
[storage]
directory = "data/"
[output]
directory = "public/"
You can update both reports and historical data by running a single sync command.
pypi-tracker sync --config pypi-tracker.toml
Keep your CSVs
Run sync on a schedule and commit data/, because the CSV files are your history. If you lose them, or
stop collecting for longer than PyPIStats keeps data, those days are gone. History also can't reach back
further than PyPIStats did on your first run, so totals are "recorded" downloads, not lifetime downloads.
More
The guide covers configuration, every report format, the Python API, and GitHub Actions and Cloudflare Pages setup.
Metadata
Release files for pypi-tracker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypi_tracker-0.1.0.tar.gz | 22.8 kB | Without provenance | Details for pypi_tracker-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypi_tracker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pypi_tracker-0.1.0-py3-none-any.whl |
Total release size: 38.5 kB
Release files / pypi_tracker-0.1.0.tar.gz
| Download URL | pypi_tracker-0.1.0.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5247b39212d922adcb7ccd2ca661fda2a8643ebff9c5464b2b8319e25e2aec79
|
|
BLAKE2b-256 checksum How to use checksums |
b5f94e07f38d72e71b94cef774ef549948c4fce5f19abbccc135face399e8815
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / pypi_tracker-0.1.0-py3-none-any.whl
| Download URL | pypi_tracker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fe17a453413bbc7cf84a2d89e321184f20b2f7b2d88e5398771898a74393774
|
|
BLAKE2b-256 checksum How to use checksums |
c494efcf1df48fab9dae05b4b2d11dedc02c242a9f669f9b92119ada386adddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for pypi-tracker 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.