Skip to main content

Release Tools PyPI - Latest Version GitHub Tag

Note: These tools are being used for my personal projects and are not meant for general public use.

This project provides a set of tools to manage publishing a large number of files using GitHub releases, particularly to overcome the 1000 file limit per release by creating supplementary releases. This assumes that gh (the GitHub CLI) is installed and configured on your system, as it is used to interact with GitHub releases.

STAC index preparation and publication are maintained in Indian Open Maps, through iomaps admin stac and iomaps admin make-release.

Features

  • Generate file lists: Create a CSV file containing a list of all files in a GitHub release.
  • Upload files to a release: Upload files from a local directory to a GitHub release, with an option to overwrite existing files.
  • Delete files from a release: Delete specified files from a release and its supplementary releases.

Installation

This project is packaged using Hatch. To install the tools, you can run the following command:

pip install .

This will install the gh_release_tools package and make the following command-line tools available:

  • generate-lists
  • upload-to-release
  • delete-from-release
  • download-from-release

Usage

It is recommended to run the tools using uvx to avoid dependency conflicts with other installed packages.

uvx

uvx --from gh_release_tools generate-lists --release <tag> --extension <extension>
uvx --from gh_release_tools upload-to-release --release <tag> --folder <folder> --extension <extension> [--overwrite] [--create-extra-releases] [--batch-size <size>]
uvx --from gh_release_tools download-from-release --release <tag> [--file-list <file>] [--output-dir <dir>] [--skip-existing] [--batch-size <size>] [file1 file2 ...]

generate-lists

This tool generates a CSV file named listing_files.csv containing a list of assets from a specified GitHub release and its associated -extra releases. The CSV file includes the file name, size, and download URL for each asset. The generated CSV is then uploaded to the base release, overwriting any existing listing_files.csv.

Usage:

generate-lists --release <tag> --extension <ext1> [--extension <ext2> ...] [--repo <owner/repo>]

Arguments:

  • --release, -r: The base name of the GitHub release (e.g., v1.0.0).
  • --extension, -e: The file extension of the assets to include in the list (e.g., .zip). This argument can be specified multiple times for different extensions.
  • --repo, -g: (Optional) The GitHub repository in the format owner/repo. If not provided, it will be inferred from the current directory.

Example:

generate-lists --release v1.0.0 --extension .zip --extension .txt

This command will generate a listing_files.csv file with a list of all .zip and .txt files from the v1.0.0 release and any releases named v1.0.0-extra<number>.

upload-to-release

This tool uploads files from a local folder to a GitHub release. It can be configured to skip files that already exist in the release or to overwrite them. It can also create new supplementary releases if the target release is full.

Usage:

upload-to-release --release <tag> --folder <folder> --extension <ext1> [--extension <ext2> ...] [--overwrite] [--create-extra-releases] [--batch-size <size>] [--repo <owner/repo>]

Arguments:

  • --release, -r: The git tag of the release to upload to.
  • --folder, -d: The local folder containing the files to upload.
  • --extension, -e: The file extension of the files to upload (e.g., .zip). This argument can be specified multiple times.
  • --overwrite: (Optional) Overwrite existing assets in the release.
  • --create-extra-releases, -x: (Optional) Create supplementary releases if the main release is full.
  • --batch-size, -b: (Optional) The number of files to upload in a single batch. (default: 1)
  • --repo, -g: (Optional) The GitHub repository in the format owner/repo. If not provided, it will be inferred from the current directory.

Example:

upload-to-release --release v1.0.0 --folder /path/to/files --extension .zip

This command will upload all .zip files from the /path/to/files directory to the v1.0.0 release. If a file with the same name already exists in the release, it will be skipped. To overwrite existing files, use the following command:

upload-to-release --release v1.0.0 --folder /path/to/files --extension .zip --overwrite

delete-from-release

This tool deletes specified files from a GitHub release and its associated -extra releases. You can provide a list of files to delete either as command-line arguments or in a separate text file.

Usage:

delete-from-release --release <tag> [--file-list <file>] [--repo <owner/repo>] [file1 file2 ...]

Arguments:

  • --release, -r: The base name of the GitHub release (e.g., v1.0.0).
  • --file-list, -f: (Optional) Path to a text file with a list of files to delete (one file per line).
  • files: (Optional) Space-separated list of file names to delete.
  • --repo, -g: (Optional) The GitHub repository in the format owner/repo. If not provided, it will be inferred from the current directory.

Example:

delete-from-release --release v1.0.0 --file-list files_to_delete.txt my_file.zip

This command will delete the files listed in files_to_delete.txt and my_file.zip from the v1.0.0 release and any releases named v1.0.0-extra<number>.

download-from-release

This tool downloads specified files from a GitHub release and its associated -extra releases.

Usage:

download-from-release --release <tag> [--file-list <file>] [--output-dir <dir>] [--skip-existing] [--batch-size <size>] [--repo <owner/repo>] [file1 file2 ...]

Arguments:

  • --release, -r: The base name of the GitHub release (e.g., v1.0.0).
  • --file-list, -f: (Optional) Path to a text file with a list of files to download (one file per line).
  • --output-dir, -d: (Optional) The directory to save the downloaded files. If not provided, files are downloaded to the current directory.
  • --skip-existing: (Optional) Skip downloading files that already exist in the output directory.
  • --batch-size, -b: (Optional) The number of files to download in a single batch. (default: 1)
  • files: (Optional) Space-separated list of file names to download.
  • --repo, -g: (Optional) The GitHub repository in the format owner/repo. If not provided, it will be inferred from the current directory.

Example:

download-from-release --release v1.0.0 --file-list files_to_download.txt --output-dir /path/to/downloads

This command will download the files listed in files_to_download.txt from the v1.0.0 release and any releases named v1.0.0-extra<number> into the /path/to/downloads directory.

download-from-release --release v1.0.0 my_file.zip --skip-existing

This command will download my_file.zip to the current directory, but only if it doesn't already exist.

Metadata

Release files for gh_release_tools 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh_release_tools 0.1.15
File Size Uploaded Provenance Actions
gh_release_tools-0.1.15.tar.gz 8.3 kB Without provenance Details for gh_release_tools-0.1.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gh_release_tools 0.1.15
File Interpreter ABI Platform Actions
gh_release_tools-0.1.15-py3-none-any.whl Python 3 none any Details for gh_release_tools-0.1.15-py3-none-any.whl

Total release size: 20.8 kB

Release files / gh_release_tools-0.1.15.tar.gz

Download URL gh_release_tools-0.1.15.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4a06e442e0fef46815eb19ee43d8e9e3b7d379d96231730ad2cb80ae8ab7ac30
BLAKE2b-256 checksum
How to use checksums
75157a1a74627244a43b5157e66f291ed6b75db9d0d3da13667e2fc77f0c54a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / gh_release_tools-0.1.15-py3-none-any.whl

Download URL gh_release_tools-0.1.15-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a15a047e7ebedf7679f94d12ba96700b23d196c948003c965759405ea9c58b7
BLAKE2b-256 checksum
How to use checksums
da93564f9c8603cd98c5e4275098c4078ebe816b0e85f09e6c72a904e538f07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for gh_release_tools 0.1.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page