Skip to main content

Package to update the end-users copy of your file to the latest version

Project description

Update_Check is a Python module to implement in distributed programs. The functions as of now are checking for updates and updating a users Python file. It works by comparing the users Python file to the newest version of the file that's stored on a website like GitHub.

Usage

Checking if File is Up to Date


One feature of this module is checking if the users file is up to date with the latest version.

Syntax:

isUpToDate(pathToProgram, programURL)

Heres an example of the isUpToDate() function:

from update_check import isUpToDate

if isUpToDate(__file__, "https://github.com/username/repo/myProgram.py") == False:
   doSomething()

This function will return True if the program is up to date with the web version and will return False if it's not. Note: __file__ can be replaced with a path to a file.

 

Updating a File


To update a file using this module, you will need to use the update() function.

Syntax:

update(programURL, pathToProgram)

Here's an example of the update() function:

from update_check import update

update("https://github.com/username/repo/myProgram.py", __file__)

That block of code would grab the file from the URL and update the local file to that file. Note: __file__ can be replaced with a path to a file.

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

update_check-0.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

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