Package to download any release assets from the latest compatible version
Project description
GitHub Release Downloader
Python package to download/filter any release assets from the latest compatible version.
Installation
pip install github_release_downloader
Usage
This tool can be used as library:
from semantic_version import SimpleSpec
from github_release_downloader import check_and_download_updates, GitHubRepo
from pathlib import Path
import re
check_and_download_updates(
GitHubRepo("OwnerName", "RepoName", "OptionallyToken"), # Releases source
SimpleSpec("~1.1"), # Search 1.1.0 compatible version
assets_mask=re.compile(".*\\.exe"), # Download *.exe only
downloads_dir=Path("downloads"), # Where to download
)
Or either it can be used as cli-tool:
python -m github_release_downloader -u OwnerName -n RepoName -r ~1.1 -m .*\.exe -o .\downloads
Features
- Downloads only compatible releases
- Filters assets using regex
- Has optional download_callback
- CLI tool can be used in CI
- Handles token from GITHUB_TOKEN env
- Loads updates only when it's needed (caches last version used)
- Loggs own actions
- Uses only few GitHub API endpoints (don't download code, you've never needed)
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
Close
Hashes for github_release_downloader-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cc66d5eccf37ccfea9c848685fb84240e4b1fe5798693ba57daa809ce12eaed |
|
MD5 | 759d205ec2cd7945d58317057d8beffe |
|
BLAKE2b-256 | 37fe18543e3239799948659d7ace1aeab9d8ac017f0db8cf96ea5cf64a37398f |
Close
Hashes for github_release_downloader-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d82e55aa036565bcefcc992772ab471b5b3ccb0573ac8ff45a8b9614c8ae268 |
|
MD5 | 16d0566f137c7c5dd142998b13e9b4b5 |
|
BLAKE2b-256 | d1fd49c72cbd16c08a4cab3299fff427bb31e10f209ff0380720c220ace27df6 |