pptrend
A zero-dependency command-line tool to track and visualize PyPI package download trends directly in your terminal.
✨ Features
- Zero Dependencies: Built entirely with Python standard libraries. No
pip installrequired for dependencies. - Adaptive ASCII Charts: Automatically adjusts the chart granularity (daily, weekly, monthly, or yearly) based on the data range.
- Smart Caching: Stores data locally to minimize API calls. Skips network requests if data is recent.
- Cross-Platform: Works on macOS, Linux, and Windows.
📡 Data Source & Limitations
- Primary Source: PePy.tech API.
- Fallback Source: PyPIStats.org API (used if PePy is unavailable).
- Data Range: APIs provide statistics for the last 180 days. However,
pptrendstores data locally, allowing you to build a historical record that extends far beyond 180 days by running the tool periodically. - Data Continuity: If a package hasn't been updated in the database for more than 180 days, its historical data is considered "disconnected" and can no longer be extended.
- Accuracy: Download counts are aggregated from PyPI statistics. Note that these figures may include automated systems (like CI/CD pipelines) and might not represent unique human users.
🚀 Installation
Option 1: Using uv (Recommended)
First, install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then, choose one of the following ways to run pptrend:
A. Run directly with uvx (No installation required):
uvx pptrend requests
B. Install permanently with uv tool:
uv tool install pptrend
pptrend requests
Option 2: Using pipx
pipx installs the tool in an isolated virtual environment, keeping your system clean.
pipx install pptrend
pptrend requests
Option 3: Manual Install
Download pptrend.py and run it directly:
./pptrend.py <package_name>
📖 Usage
Track the download history of any PyPI package:
pptrend requests
pptrend flask
pptrend numpy
Check version:
pptrend --version
Clean disconnected data: If a package hasn't been tracked for over 180 days, its history can no longer be extended. Use this command to automatically scan and remove such stale records for all packages:
pptrend --clean
📊 Example Output
requests - Week view (180 days of data)
======================================================================
10-13 │ │ 180.4M
10-20 │██████████████████████████████████████ │ 306.2M
...
04-06 │█████████████████████████████████████████████│ 326.7M
======================================================================
Total records: 180 | Periods shown: 26 weeks
Min: 178,740,886 | Max: 326,665,297 | Avg: 247,929,848
⚙️ Data Storage
pptrend stores its database in the standard application data directory for your OS:
- macOS:
~/Library/Application Support/pptrend/pptrend.db - Linux:
~/.local/share/pptrend/pptrend.db - Windows:
%APPDATA%\pptrend\pptrend.db
🛠️ Development
To run the script from source using uv:
git clone https://github.com/cphotor/pptrend.git
cd pptrend
uv run pptrend.py requests
📄 License
MIT License
Release files for pptrend 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pptrend-0.1.3.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pptrend-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / pptrend-0.1.3.tar.gz
| Download URL | pptrend-0.1.3.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fee4f06516ccfa5ddf53b8218f1001e52e6ab89a40baf21f22aa9e6b82558828
|
|
BLAKE2b-256 checksum How to use checksums |
fd51cb8a5f91b365081311daacbf4d08b36c369ff8c2f8f31289b948ee0f1649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.
Transparency logRelease files / pptrend-0.1.3-py3-none-any.whl
| Download URL | pptrend-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
155c68f0cb8e86bf9909c48f64bfddb1977523e61c86247e56ef980f48e457f9
|
|
BLAKE2b-256 checksum How to use checksums |
55c7cdec0556ae34795e021bbec373cbfefb6fd5367ddd1a9b7d65a03b3dc105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.
Transparency log