pypistats
Python interface to PyPI Stats API https://pypistats.org/api
What it is and what it does
pypistats is a Python client for the PyPI Stats API that retrieves aggregate download statistics for packages on PyPI without requiring direct BigQuery access. It works as both a command-line tool and a library, querying data available for the last 180 days and presenting results in multiple formats (JSON, Markdown, HTML, TSV, plain text tables).
The tool supports several query types: recent downloads (last day/week/month), downloads by Python version (major or minor), downloads by system, and overall statistics. It can accept a package name directly or read from a local pyproject.toml or setup.cfg file. Results are formatted with color-coded terminal output by default and can be sorted by download count or date.
Use it for:
- Monitor your own package's download trends over the last 180 days to gauge adoption and usage patterns.
- Compare download statistics across Python versions to understand which versions your users are running.
- Generate download reports in Markdown or HTML for inclusion in documentation, GitHub issues, or release notes.
- Analyze ecosystem trends by querying statistics for multiple packages to identify popular dependencies.
- Automate download metrics collection in CI/CD pipelines to track package health over time.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Queries the PyPI Stats API to retrieve download statistics for Python packages from the last 180 days, available as a command-line tool or Python library.
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real need for developers who want to track PyPI download statistics without setting up BigQuery. The MIT license is permissive. Install it if you need programmatic or command-line access to PyPI Stats data.
Install
pypistats on PyPI
pip
pip install pypistatsuv
uv add pypistatspoetry
poetry add pypistatsInstalling pypistats
Before you install
Low friction installation with six lightweight runtime dependencies. The package is actively maintained with a recent release and steady commit activity, supporting current Python versions (3.10–3.15).
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both commercial and personal projects.
Quickstart
pip install pypistats
from pypistats.api import overall
stats = overall('pillow')
print(stats)
Requires Python 3.10 or later; queries depend on network access to pypistats.org API.
Verify before relying
- Whether the package caches API responses or always fetches fresh data from the network.
- Rate limiting or quota constraints imposed by the PyPI Stats API that users should be aware of.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — platformdirs, prettytable, python-slugify, termcolor, tomli, urllib3 |
| Maintenance | actively maintained — 45 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,361/month — #12,616 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pypistats-1.14.0-py3-none-any.whl
Keywords: BigQuery, PyPI, downloads, statistics, stats
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
MLB-StatsAPIProvides Python access to MLB's Stats API,…
copyleft · top 15,000 on PyPI
tavily-cliTavily CLI provides command-line and…
permissive · top 15,000 on PyPI
nba_apinba_api provides Python access to NBA.com's…
permissive · top 15,000 on PyPI
pyproject-apiProvides a programmatic API to read and…
permissive · top 5,000 on PyPI
sec-apiA Python client for the SEC-API.io service that…
permissive · top 15,000 on PyPI
nflreadpyDownloads and caches NFL data from nflverse…
permissive · top 15,000 on PyPI
pypi-simpleA client library for querying PyPI and…
permissive · top 15,000 on PyPI
sib-api-v3-sdkPython SDK for the SendinBlue REST API,…
unclear · top 15,000 on PyPI
trendspyFetch and analyze Google Trends data including…
permissive · top 15,000 on PyPI
m2r2Converts markdown files with embedded…
permissive · top 15,000 on PyPI