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 compatible releases (or latest if no requirements set)
- 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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25f6db4005589ef5d8eb4f57f7ab8c060801ecbcc590940cb22af2852d5a041b |
|
MD5 | e5a7ed4bb195abc936e9a5e9f5b02c83 |
|
BLAKE2b-256 | c25885c1ab0ba2f80c07788f11350db62c114874ac557cfa95fd78acd9cf66d0 |
Close
Hashes for github_release_downloader-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 829e6d261ad8a18969e55f9ad89330a1a827fa6064799517b5d172373fa58227 |
|
MD5 | 10b14d8f591f91914b01429295e5e5eb |
|
BLAKE2b-256 | 84543a900731ec2b159cffc7c04294237e54b1759efa60c44fb4785f175c8526 |