Skip to content

Make the PyPI version badge update within minutes - #3

Merged
fullstackspectrum merged 1 commit into
mainfrom
fresher-pypi-badge
Nov 3, 2026
Merged

fullstackspectrum merged 1 commit into
mainfrom
fresher-pypi-badge

Conversation

@fullstackspectrum

Copy link
Copy Markdown
Owner

After the v0.2.1 release the PyPI badge kept showing v0.2.0. shields.io caches pypi/v badges for 6 hours (max-age=21600), and that floor can't be lowered with cacheSeconds.

This switches to a dynamic badge that reads info.version from PyPI's JSON API. It's cached for 2 minutes and looks the same: label pypi, value v0.2.1, same logo and colour.

The Homebrew badge already uses a dynamic badge with the same 2-minute cache. The Python versions badge keeps its 12-hour cache, since supported versions rarely change.

🤖 Generated with Claude Code

shields.io caches the pypi/v badge for six hours, so it showed the
previous version for hours after each release. The dynamic badge reads
PyPI's JSON API directly and is cached for two minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fullstackspectrum
fullstackspectrum merged commit abf87b7 into main Nov 3, 2026
5 checks passed
@fullstackspectrum
fullstackspectrum deleted the fresher-pypi-badge branch November 3, 2026 23:18
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