GitHub Release download count and other statistics.
Project description
Description
Python script to obtain GitHub Release download count and other statistics.
Can be used as both a standalone script and a Python module.
Supports both Python 2 and 3 out of the box.
Installation
You can get ghstats using one of the following methods:
Install from PyPI: pip install ghstats.
Save ghstats.py from the repository.
Download a whole repository.
Usage
ghstats [user] [repo] [tag] [options] ghstats [user/repo] [tag] [options]
Arguments:
Argument |
Description |
---|---|
user |
Repository owner. If not present, user will be prompted for input. |
repo |
Repository title. If not present, user will be prompted for input. |
tag |
Release tag name. If not present, prints the total number of downloads. |
Options:
Option |
Description |
---|---|
-d, --detail |
Print detailed statistics for release(s). |
-q, --quiet |
Print only resulting numbers and errors. Overrides -d option. |
-l, --latest |
Get stats for the latest release. Tag argument will be ignored. |
-h, --help |
Show help on script usage. |
Environment Variables:
Environment Variable |
Description |
---|---|
GITHUB_TOKEN |
GitHub OAuth token. Use to increase API request limit. |
Examples
Examples for atom/atom repository:
ghstats atom atom # Fetch download count for all releases.
ghstats atom/atom # Fetch download count for all releases (alt. syntax).
ghstats atom atom -q # Quiet mode (print only numerical result).
ghstats atom atom -d # Detailed description for every release.
ghstats atom atom -l # Fetch download count for the latest release.
ghstats atom atom -l -d # Detailed description for the latest release.
ghstats atom atom -l -q # Quiet mode for the latest release.
ghstats atom atom v1.0.0 # Fetch download count for "v1.0.0" release.
ghstats atom atom v1.0.0 -d # Detailed description for "v1.0.0" release.
ghstats atom atom v1.0.0 -q # Quiet mode for "v1.0.0" release.
ghstats # Get input for username and repository from user.
ghstats -h # Print help.
Changelog
v1.1.1
v1.1.0
v1.0.1
Redesigned exceptions (issue #2).
v1.0.0
Initial release.
License
MIT License
You are free to use, modify, distribute (including commercial purposes) as long as you credit the original author and include the license text.
License text: MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ghstats-1.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48932c776c6826fb7394c881348d063fcd3ed226738fb11503ee757ff70d7c94 |
|
MD5 | c7c91944ee787b019fd1ff0d99b0fcd2 |
|
BLAKE2b-256 | f2ff787c308a64089137675d7e6c6faa183db89d4587f465f4f31a9ffd023f66 |