PyPI download totals, metadata, and breakdowns from one integration
When it’s useful
Maintainers and internal tooling authors want adoption signals from PyPI without hand-rolling HTTP clients against pypistats, re-parsing the same JSON in every script, or hammering an API that applies per-IP rate limits.
What you can do
- Fetch package metadata together with last day, week, month, and 180-day download counts, using the pypistats API as documented upstream.
- Read Python version and operating system mix as top-five / top-four breakdowns over the last 30 days (the shape the API returns).
- Use the project as a typed Python library, or install the
cliextra for Rich tables or JSON in the terminal. - Rely on on-disk caching with a configurable TTL (default one hour), plus helpers to clear the cache or inspect its size and location.
Limits and fit
Version and OS slices are 30-day views; numbers are typically about a day or two behind live traffic, and everything depends on pypistats staying available. Rate limits are enforced by that service (its docs describe on the order of a few requests per second and a few dozen per minute); caching is meant to cut repeat calls. Python 3.8+. Reference material is in the GitHub repository and at ysskrishna.github.io/pypi-package-stats.



