Skip to content

docs: source download badges from pepy.tech to stop pypistats rate-limit errors#250

Merged
lesnik512 merged 1 commit into
mainfrom
docs/pepy-download-badges
Jun 30, 2026
Merged

docs: source download badges from pepy.tech to stop pypistats rate-limit errors#250
lesnik512 merged 1 commit into
mainfrom
docs/pepy-download-badges

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Problem

The six monthly-download badges in the README used img.shields.io/pypi/dm/<pkg>, which shields.io sources from pypistats.org. pypistats rate-limits by IP and fails when ~6 uncached badge requests arrive at once — the shields maintainers describe this exact case (badges/shields#11620, psf/pypistats.org#100). With exactly six download badges, the README routinely rendered "rate limited by upstream service".

Change

Swap each download badge to pepy.tech, which serves statically cached SVGs from a different upstream:

  • Image: img.shields.io/pypi/dm/<pkg>.svgstatic.pepy.tech/badge/<pkg>/month
  • Link: pypistats.org/packages/<pkg>pepy.tech/projects/<pkg>

Metric stays monthly downloads (downloads/month). The pyversions badges are untouched (they don't hit pypistats).

Verification

  • All 6 static.pepy.tech/badge/<pkg>/month endpoints return HTTP 200 and render a count (e.g. downloads/month | 16k).
  • grep confirms zero pypi/dm references remain and 6 pepy badges present.
  • Docs-only change; no code or tests affected.

🤖 Generated with Claude Code

…mit errors

The six monthly-download badges fetched from img.shields.io/pypi/dm/<pkg>,
which shields sources from pypistats.org. pypistats rate-limits by IP and
fails on ~6 concurrent uncached requests, so the README's six badges
routinely rendered "rate limited by upstream service".

Switch each download badge to static.pepy.tech/badge/<pkg>/month (pepy
serves statically cached SVGs from a different upstream) and repoint the
click-through to pepy.tech/projects/<pkg>. Metric stays monthly downloads;
pyversions badges are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit ec1cbd1 into main Jun 30, 2026
7 checks passed
@lesnik512 lesnik512 deleted the docs/pepy-download-badges branch June 30, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant