Skip to main content

Self-hosted PyPI download badge service that winnows CI traffic out of download counts.

Project description

pypi-winnow-downloads

PyPI version Python versions License CI Coverage pip*/uv/poetry/pdm downloads

Self-hosted PyPI download badge service that winnows CI traffic out of download counts. Produces shields.io-compatible endpoint badges filtered by BigQuery's details.ci flag and an interactive-installer allowlist (pip, uv, poetry, pdm, pipenv, pipx) — more honest than any existing alternative for small or young Python packages.

The pip*/uv/poetry/pdm badge above is served by this project itself — eating our own dogfood. The endpoint went live with milestone M3 deployment on 2026-04-24 and currently shows 0 until the first release lands on PyPI; after that the count climbs automatically.

What the badge actually counts

The hero badge — labelled pip*/uv/poetry/pdm (Nd) — counts downloads that meet all of these conditions over the configured rolling window:

  • details.ci != True (BigQuery's CI-detection flag is not set)
  • details.installer.name is one of the interactive Python packaging tools: pip, uv, poetry, pdm, pipenv, or pipx (the asterisk in pip* covers pip itself plus pipenv and pipx, which delegate to pip and inherit its installer telemetry pattern)

Excluded (the things that inflate other badges):

  • Mirrors: bandersnatch, Nexus, devpi, Artifactory, z3c.pypimirror
  • Browser fetches via the PyPI web UI (installer_name == "Browser")
  • Generic HTTP UAs used by scrapers and scanners (requests, curl, etc.)
  • Unknown installer (installer_name == "None") — uncategorised traffic that in practice is dominated by automated scanners

For context on how much these can dwarf real installs: at v1 deploy time, one of the seed packages had 2,771 "non-CI" downloads in 30 days under a naïve mirror-and-all-installers query, of which 1,325 (48%) was bandersnatch alone and only 14 came from pip + uv + poetry + pdm. The honest signal is the 14.

The filter is fail-closed: a future pypinfo emitting a new mainstream installer will be excluded until the allowlist in src/pypi_winnow_downloads/collector.py is updated explicitly. That's a feature for a project whose pitch is honesty.

Install

pip install pypi-winnow-downloads

Run with a YAML config — copy config.example.yaml and edit:

winnow-collect --config /path/to/config.yaml

To deploy as a daily systemd timer plus a Caddy HTTPS service serving the output directory, see deploy/README.md.

Status

Alpha. Self-hosted reference deployment running at pypi-badges.intfar.com, producing daily badges for four target packages (the three seed packages in config.example.yaml plus pypi-winnow-downloads itself for the dogfood badge). Expect rough edges and possible breaking changes in the 0.x series.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi_winnow_downloads-0.1.0.tar.gz (106.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypi_winnow_downloads-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file pypi_winnow_downloads-0.1.0.tar.gz.

File metadata

  • Download URL: pypi_winnow_downloads-0.1.0.tar.gz
  • Upload date:
  • Size: 106.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypi_winnow_downloads-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4ec050ccd053fefd4205b1f176c1d8ca18cec7791565dc7b80cba6db13c2f01
MD5 d7f1eea3ae1e5db69b25a4d37b441bf3
BLAKE2b-256 58556d8a6a8d1ed8709a5380d20f2e61731e21d4580282a9a7003540caeb21b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypi_winnow_downloads-0.1.0.tar.gz:

Publisher: publish.yml on cmeans/pypi-winnow-downloads

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pypi_winnow_downloads-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pypi_winnow_downloads-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6440bba1eb7dcf5693c749e801332dcefd3d4d879c71dd05e1c2b30932595051
MD5 493cf1a192efe60f7cf7e6f65ab87d1a
BLAKE2b-256 04ccaf585543d75ad9dc143e649a74bec9d476222446365ad0f5f49cbad4308e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypi_winnow_downloads-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cmeans/pypi-winnow-downloads

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page