# GitHub Release Downloader
[![PyPI version shields.io](https://img.shields.io/pypi/v/github_release_downloader.svg)](https://pypi.org/project/github_release_downloader/)
[![GitHub license](https://img.shields.io/github/license/MBQbUtils/GithubReleaseDownloader.svg)](https://github.com/MaxBQb/github_release_downloader/blob/master/LICENSE.md)
![Python versions](https://img.shields.io/pypi/pyversions/github_release_downloader.svg)
---
Python package to download/filter any release assets from the latest compatible version.
## Installation
```cmd
pip install github-release-downloader
```
## Usage
This tool can be used as library:
```py
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:
```cmd
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)
Raw data
{
"_id": null,
"home_page": "",
"name": "github-release-downloader",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "github,release,download,asset,downloader",
"author": "MaxBQb",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/c2/58/85c1ab0ba2f80c07788f11350db62c114874ac557cfa95fd78acd9cf66d0/github_release_downloader-1.1.0.tar.gz",
"platform": null,
"description": "# GitHub Release Downloader\n[![PyPI version shields.io](https://img.shields.io/pypi/v/github_release_downloader.svg)](https://pypi.org/project/github_release_downloader/)\n[![GitHub license](https://img.shields.io/github/license/MBQbUtils/GithubReleaseDownloader.svg)](https://github.com/MaxBQb/github_release_downloader/blob/master/LICENSE.md)\n![Python versions](https://img.shields.io/pypi/pyversions/github_release_downloader.svg)\n---\nPython package to download/filter any release assets from the latest compatible version.\n\n## Installation\n```cmd\npip install github-release-downloader\n```\n\n## Usage\n\nThis tool can be used as library:\n```py\nfrom semantic_version import SimpleSpec\nfrom github_release_downloader import check_and_download_updates, GitHubRepo\nfrom pathlib import Path\nimport re\n\n\ncheck_and_download_updates(\n GitHubRepo(\"OwnerName\", \"RepoName\", \"OptionallyToken\"), # Releases source\n SimpleSpec(\"~1.1\"), # Search 1.1.0 compatible version\n assets_mask=re.compile(\".*\\\\.exe\"), # Download *.exe only\n downloads_dir=Path(\"downloads\"), # Where to download\n)\n```\nOr either it can be used as cli-tool:\n```cmd\npython -m github_release_downloader -u OwnerName -n RepoName -r ~1.1 -m .*\\.exe -o .\\downloads\n```\n\n## Features\n1. Downloads compatible releases (or latest if no requirements set)\n2. Filters assets using regex\n3. Has optional download_callback\n4. CLI tool can be used in CI\n5. Handles token from GITHUB_TOKEN env\n6. Loads updates only when it's needed (caches last version used)\n7. Loggs own actions\n8. Uses only few GitHub API endpoints (don't download code, you've never needed)\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Package to download any release assets from the latest compatible version",
"version": "1.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/MBQbUtils/GithubReleaseDownloader/issues",
"Homepage": "https://github.com/MBQbUtils/GithubReleaseDownloader"
},
"split_keywords": [
"github",
"release",
"download",
"asset",
"downloader"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "84543a900731ec2b159cffc7c04294237e54b1759efa60c44fb4785f175c8526",
"md5": "10b14d8f591f91914b01429295e5e5eb",
"sha256": "829e6d261ad8a18969e55f9ad89330a1a827fa6064799517b5d172373fa58227"
},
"downloads": -1,
"filename": "github_release_downloader-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "10b14d8f591f91914b01429295e5e5eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7433,
"upload_time": "2023-07-16T19:56:03",
"upload_time_iso_8601": "2023-07-16T19:56:03.179589Z",
"url": "https://files.pythonhosted.org/packages/84/54/3a900731ec2b159cffc7c04294237e54b1759efa60c44fb4785f175c8526/github_release_downloader-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c25885c1ab0ba2f80c07788f11350db62c114874ac557cfa95fd78acd9cf66d0",
"md5": "e5a7ed4bb195abc936e9a5e9f5b02c83",
"sha256": "25f6db4005589ef5d8eb4f57f7ab8c060801ecbcc590940cb22af2852d5a041b"
},
"downloads": -1,
"filename": "github_release_downloader-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e5a7ed4bb195abc936e9a5e9f5b02c83",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6822,
"upload_time": "2023-07-16T19:56:04",
"upload_time_iso_8601": "2023-07-16T19:56:04.836974Z",
"url": "https://files.pythonhosted.org/packages/c2/58/85c1ab0ba2f80c07788f11350db62c114874ac557cfa95fd78acd9cf66d0/github_release_downloader-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-16 19:56:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MBQbUtils",
"github_project": "GithubReleaseDownloader",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "github-release-downloader"
}