Skip to main content

Fetch, maintain and query a timeline of downloads from Python's PyPI Package indexes used by pip

Project description

pypi-stats-timeline

@readwithai - X - blog - machine-aided reading

Fetch and maintain timelines of downloads from Python's package Index PyPI. Query your data offline.

The website PyPI stats keeps track of downloads for Python's packaging system PyPI used to install packages from pip (and nowerdays pipx and uv. PyPI stats provides an API to query this data.

This tool wraps this API for the convenience of parsing this data, the performance of caching data offline, the politeness of avoiding unnecessary API requests, and added functionality of maintaining historic data that would otherwise be removed from PyPI's window.

Installation

You can install pypi-stats-timeline using pipx:

pipx install pypi-stats-timeline

Usage

To fetch statistics from the PyPI package kitty-plotnine you can run

pypi-stats-timeline kitty-plotnine

To display fetched data you can use the -n option

pypi-stats-timeline kitty-plotnine

Output is in JSON format.

To output the total number of downloads you can use -T.

You may well like to use anothe tools to do plotting or data analysis. I might recommend jupyter or a Python script with matplotlib for this sort of analysis. If you want to do quick and dirty analysis and plotting from the command-line I might recommend my tools k-nine and npcli.

Some related tools

If you like this tool you might be interested in other tools I have made to keep track of these sorts of statistics.

  • gh-views fetches, maintains and queries the number of views and downloads for a github repo
  • gh-star-timeline fetches, maintains and queries the number of stars for a github repo
  • obsidian-plugin-stats fetches, maintains and queries the number of downloads for a plugin for the markdown editor Obsidian.

Support

If you like this tool, you could support it giving my money (maybe $1) on my ko-fi.

This will incentivise me respond to any issues and create similar tools.

You could also reading some of my writing on other topics - maybe this review of how people take notes in Obsidian.

About me

I am @readwithai. I make tools for reading, research and agency sometimes using the note-taking tool Obsidian.

I also produce a stream of tools as a side effet of my work.

You can follow me on X where I talk about many things include this, or follow me on my blog where I write more about Obsidian reading and research.

logo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi-stats-timeline-1.1.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file pypi-stats-timeline-1.1.0.tar.gz.

File metadata

  • Download URL: pypi-stats-timeline-1.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pypi-stats-timeline-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bdf766e6f4e91d6ca2c49c22e817f84578f14f44e259ee885ec3f044d8860088
MD5 d41b9b4d558f5861044d0514e7eb8b1d
BLAKE2b-256 1fb9a75eaa8e919df143b6e2cc5cab3bab1fcf13dfacce185df8ad5b83005f60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page