Skip to main content

Package to download any release assets from the latest compatible version

Project description

GitHub Release Downloader

PyPI version shields.io GitHub license Python versions

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

  1. Downloads compatible releases (or latest if no requirements set)
  2. Filters assets using regex
  3. Has optional download_callback
  4. CLI tool can be used in CI
  5. Handles token from GITHUB_TOKEN env
  6. Loads updates only when it's needed (caches last version used)
  7. Loggs own actions
  8. Uses only few GitHub API endpoints (don't download code, you've never needed)

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_release_downloader-1.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for github_release_downloader-1.1.0.tar.gz
Algorithm Hash digest
SHA256 25f6db4005589ef5d8eb4f57f7ab8c060801ecbcc590940cb22af2852d5a041b
MD5 e5a7ed4bb195abc936e9a5e9f5b02c83
BLAKE2b-256 c25885c1ab0ba2f80c07788f11350db62c114874ac557cfa95fd78acd9cf66d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for github_release_downloader-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 829e6d261ad8a18969e55f9ad89330a1a827fa6064799517b5d172373fa58227
MD5 10b14d8f591f91914b01429295e5e5eb
BLAKE2b-256 84543a900731ec2b159cffc7c04294237e54b1759efa60c44fb4785f175c8526

See more details on using hashes here.

Supported by

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