Skip to main content

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.

The pypi-tracker dashboard, showing total downloads, a download trend chart and a breakdown by package

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/ (public/aggregate/ covers all your packages together), 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.
dashboard Runs build, then writes a static website that charts the reports.
serve Runs dashboard, then previews the site locally, reloading it when anything changes.
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 pypi-tracker.toml file, which commands in this directory then use

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

[dashboard]
enabled = true
title = "PyPI Package Statistics"

[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

Publish a dashboard

dashboard turns your history into a complete static website, ready for any static host. It needs no backend and no configuration, though you can brand it:

pypi-tracker serve  # generates the site, then previews it at http://localhost:8000/
[dashboard]
enabled = true  # sync updates the site too
title = "Django Control Room"
description = "Download statistics across the DCR ecosystem"
logo = "assets/logo.svg"
accent_color = "#6366f1"

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypi-tracker 0.2.0
File Size Uploaded Provenance Actions
pypi_tracker-0.2.0.tar.gz 47.4 kB Without provenance Details for pypi_tracker-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pypi-tracker 0.2.0
File Interpreter ABI Platform Actions
pypi_tracker-0.2.0-py3-none-any.whl Python 3 none any Details for pypi_tracker-0.2.0-py3-none-any.whl

Total release size: 84.6 kB

Release files / pypi_tracker-0.2.0.tar.gz

Download URL pypi_tracker-0.2.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8de3183d32b1b84fa64243c225956ce95be2106f41de1466d995730c6eccc310
BLAKE2b-256 checksum
How to use checksums
cf7401c8455324ff41718449631beda39444f91365f3ea4987c5007d1aeb103d
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.2.0-py3-none-any.whl

Download URL pypi_tracker-0.2.0-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a8670af0f0237aea1136cb07ba8ac37afa3bd2974eed449872382c5603630cf
BLAKE2b-256 checksum
How to use checksums
57e8ea257de8d2b05a84590ab44be0d6a97c2ef17e7b93ec7adae060398d44a7
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.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page