Skip to main content

a simple Python wrapper around the GitHub REST API to get download counts for release assets and ghcr.io image pulls for organizations' repositories

Project description

github-download-counts

Latest Version

Usage

usage: github_download_counts.py <arguments>

Display download statistics from GitHub repositories

* Access to the GitHub API is done using your personal access token (PAT).
  See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
  for information about PATs.

options:
  --verbose, -v         Increase verbosity (e.g., -v, -vv, etc.)
  -t <str>, --token <str>
                        GitHub API token
  --token-file <str>    GitHub API token (read from filename)
  -r [REPOS ...], --repo [REPOS ...]
                        One or more GitHub repository/repositories (e.g., org/repo)
  --date-from <str>     Human readable date expression for beginning of search time frame (default: Jan 1 1970)
  --date-to <str>       Human readable date expression for ending of search time frame (default: now)
  --release [RELEASEREGEXES ...]
                        List of regular expressions against which to match releases (e.g., ^v24\.10)
  -a [ASSETREGEXES ...], --asset [ASSETREGEXES ...]
                        List of regular expressions against which to match release assets (e.g., ^\w+.+\.iso\.01$, ^foobar_.*\.tar\.gz$
  -i [IMAGEREGEXES ...], --image [IMAGEREGEXES ...]
                        List of regular expressions against which to match container images (e.g., ^foobar/barbaz$)
  --image-tag [IMAGETAGREGEXES ...]
                        List of regular expressions against which to match container image tags (e.g., ^24\.10)

Installation

Using pip, to install the latest release from PyPI:

python3 -m pip install -U github-download-counts

Or to install directly from GitHub:

python3 -m pip install -U 'git+https://github.com/mmguero/github-download-counts'

Prerequisites

github-download-counts requires:

Contributing

If you'd like to help improve github-download-counts, pull requests will be welcomed!

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

github_download_counts-1.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_download_counts-1.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file github_download_counts-1.1.0.tar.gz.

File metadata

  • Download URL: github_download_counts-1.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for github_download_counts-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fe1aecdc3ec75d23defac7c4f93dc9a76c1ba060e213d14d9496662968ed4f5c
MD5 69104cb3e482a59551ac0027332c057c
BLAKE2b-256 24e63a03e1afc97124981bdf4bf55cd4c98749f470aa39b8ae982851f5fdd867

See more details on using hashes here.

File details

Details for the file github_download_counts-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for github_download_counts-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 492c9c4e17c9d36c472142458e39a042a245bfc6a406de28a0101ef1e961470c
MD5 0c63d2c2a7e44ccfcae2411e06aff154
BLAKE2b-256 b5984992019242c7618164cc258978a6b078b59aa3f4a3a0f96849c5863c9794

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