skillfed

pypistats

Python interface to PyPI Stats API https://pypistats.org/api

pypistats v1.14.0 107.4K downloads/30d#12,616 on PyPI240
Permissive license MIT Active released

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 pypistats

uv

uv add pypistats

poetry

poetry add pypistats

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTyping :: Typed

Tags

pypi package download statisticspypi stats api clientpython package download analyticspypi download trendspackage popularity metricspypi stats command linedownload statistics by python version
pypi-analyticsdownload-metrics

More Utilities packages