Skip to main content

GHAU

Github Auto Update package available to use for all public Github Repositories.

Currently in development.

Goal

The goal of this repository is to create a flexible package that can easily be implemented into any python project allowing for automatic updates through GitHub Releases.

Basically I got tired of building update scripts for every program I made.

Features

  • UPDATE: Automatically update distributed copies of any public GitHub repository using GitHub Releases.
  • Clean Directory: Option to delete certain files before an update is installed.
  • Whitelist: Protect certain files from being overwritten by update installation, useful for config files.
  • Pre-Releases: Choose to include pre-releases in updates.
  • Developer Mode detection: If the package detects a .git folder with files inside, it will automatically abort the update process to protect the file structure during development.
  • Automatic Reboots: Optionally reboot into the newer program after update installation. Supports rebooting into a python script, executable, or a custom run command! Windows not supported.
  • Authentication: Authenticate with the Github API to recieve a larger rate limit and access to your private repositories.
    • Do not store your API token in a public location. Use environmental variables.
  • Download assets or source code: Choose between downloading the source code or an uploaded asset!

To-Do

  • Add proper tests (gotta figure out this one)
  • Improve on asset and version detection.
  • Improve developer environment detection.
  • Cleanup & Code Optimization

Installation

Does not support Windows!

The package is posted on PyPi, so you can install it using pip, simply run:

pip install ghau

Basic Example

import ghau
#other imports

update = ghau.Update(version="v0.0.1", repo="InValidFire/ghau")
update.update()
# rest of program code

Documentation (WIP)

Read the documentation at Read The Docs

Requirements

This script utilizes PyGithub for its Github interactions, wcmatch for its file filtering, and requests for file downloads. All three can be found in the requirements.txt file in this repository.

Contributing

See something you think you can do better? Perhaps a bug I missed? Or even a new feature implementation? All you have to do is fork this repository, make the edits, then open a pull request explaining the changes you made. Thanks for contributing! <3

Metadata

Release files for ghau 0.4

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

Source distribution (sdist)

Source distribution for ghau 0.4
File Size Uploaded
ghau-0.4.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size: 21.8 kB

Release files / ghau-0.4.tar.gz

Download URL ghau-0.4.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c8a0b4dc6fbd3fd9212ca2fcb08a41100fa5c92d51cbfdac81d99ac1ab32c85
BLAKE2b-256 checksum
How to use checksums
994a4474d8f893634ced7be9a6956422ecd4e67f3e0beb3b8ff1eaefcbc1220a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / ghau-0.4-py3-none-any.whl

Download URL ghau-0.4-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6064863c7aedf8559dfd44a794d0b46f485cdfb0b0c3584011b95159de3bcf2
BLAKE2b-256 checksum
How to use checksums
efae57220f18ea60f5a4aac9ae858f872019780ebde194b28f5aea2cf899a665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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