Introduction
This program simplifies updates of your softwares by packaging the update management functions.
Installation
Install berrosoft_upgrade simply using pip
pip install berrosoft_upgrade
USAGE
# backup.py
from berrosoft_upgrade import bupgrade
# url = "http://web_server_containing_update_files/directory_of_software
# for example below, url should be
url = http://domain.ltd/backup/
version = 0.1 # (actual version of running software)
verbose = True # if you want to see messages. Default False
clean = True # To clean temporary dir after upgrade. Default True
if bupgrade.check_update(version, url, None, verbose): # return True if update is available
bupgrade.update(version, url, verbose, clean) # do upgrade
Or, simpliest, using default values
# backup.py
from berrosoft_upgrade import bupgrade
# url = "http://web_server_containing_update_files/directory_of_software
# for example below, url should be
url = http://domain.ltd/backup/
version = 0.1 # (actual version of running software)
if bupgrade.check_update(version, url): # return True if update is available
bupgrade.update(version, url) # do upgrade
SERVER SIDE
You have to write a simple text file as the example below, named update.txt. Example is for software nammed backup:
Example 1
[general]
version = 0.2.3
[update]
download = http://domain.ltd/backup/backup.tar.gz
# mode: archive, alone
mode = archive
[setup]
setup=setup.py
version: version of updated software. This text is compared to installed version and if it is different, check_update return True.
download: url of installer of new version.
mode: if installer is archive (zip, tar, tar.gz), berrosoft_upgrade know how to deal with. If it is a single file, use alone keyword.
setup: file to launch after download to apply upgrade of your software. Can be a file downloaded by download keyword
Example 2
[general]
version = 0.2.3
[update]
download = http://domain.ltd/backup/setup.py
# mode: archive, alone
mode = alone
[setup]
setup=setup.py
Of course, you have to upload updated software to url
Copyright
This package is copyright by Manuel Berrocal.
berrosoft_upgrade is licensed under GNU General Public License, version 3.
Changelog
0.2.14 (2022-07-23)
Different tests to locate and understand rst error
0.2 (2022-07-23)
Added documentation
0.1 (2022-07-22)
Initial version
Release files for berrosoft-upgrade 0.2.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| berrosoft_upgrade-0.2.14-py3-none-any.whl | Python 3 | none | any | Details |
Release files / berrosoft_upgrade-0.2.14-py3-none-any.whl
| Download URL | berrosoft_upgrade-0.2.14-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d2ad59e08fe3b5f51697febbde7b1232f09c8dead2c70f5640a7f3b09e30900
|
|
BLAKE2b-256 checksum How to use checksums |
4f3e7d4c10980d2a5ca64b10ea66606ac13653d2e1f6480d02eb28e38f99eedf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|