Self-hosted PyPI download badge service that winnows CI traffic out of download counts.
Project description
pypi-winnow-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/pdmbadge 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 shows0until 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.nameis one of the interactive Python packaging tools:pip,uv,poetry,pdm,pipenv, orpipx(the asterisk inpip*coverspipitself pluspipenvandpipx, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ec050ccd053fefd4205b1f176c1d8ca18cec7791565dc7b80cba6db13c2f01
|
|
| MD5 |
d7f1eea3ae1e5db69b25a4d37b441bf3
|
|
| BLAKE2b-256 |
58556d8a6a8d1ed8709a5380d20f2e61731e21d4580282a9a7003540caeb21b4
|
Provenance
The following attestation bundles were made for pypi_winnow_downloads-0.1.0.tar.gz:
Publisher:
publish.yml on cmeans/pypi-winnow-downloads
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypi_winnow_downloads-0.1.0.tar.gz -
Subject digest:
a4ec050ccd053fefd4205b1f176c1d8ca18cec7791565dc7b80cba6db13c2f01 - Sigstore transparency entry: 1376978110
- Sigstore integration time:
-
Permalink:
cmeans/pypi-winnow-downloads@f74db85adc96fe8c7b496f577b17b0c08cc146c7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmeans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f74db85adc96fe8c7b496f577b17b0c08cc146c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pypi_winnow_downloads-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pypi_winnow_downloads-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6440bba1eb7dcf5693c749e801332dcefd3d4d879c71dd05e1c2b30932595051
|
|
| MD5 |
493cf1a192efe60f7cf7e6f65ab87d1a
|
|
| BLAKE2b-256 |
04ccaf585543d75ad9dc143e649a74bec9d476222446365ad0f5f49cbad4308e
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypi_winnow_downloads-0.1.0-py3-none-any.whl -
Subject digest:
6440bba1eb7dcf5693c749e801332dcefd3d4d879c71dd05e1c2b30932595051 - Sigstore transparency entry: 1376978248
- Sigstore integration time:
-
Permalink:
cmeans/pypi-winnow-downloads@f74db85adc96fe8c7b496f577b17b0c08cc146c7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmeans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f74db85adc96fe8c7b496f577b17b0c08cc146c7 -
Trigger Event:
push
-
Statement type: