A useless asynchronous lib to update files.
Project description
AsthoUpdater
AsthoUpdater is a useless asynchronous lib to update files.
Made with
Install prerequisites
- Execute command:
python3 -m pip install AsthoUpdater
Examples
Simple Update
By default, the verification algorithm is sha512, you can choose another one with the algorithm
parameter, available: sha256, sha512, crc32, md5.
If you want to use another one you can contact me.
from AsthoUpdater import AsthoUpdater
async with AsthoUpdater("jsonUrl", "pathToUpdate") as a:
await a.download()
AsthoUpdater args
json_url: Your json url, required (str)
download_path: The download path, required (str)
download_timeout: The timeout to download file, optionnal, 12 at default (int)
overwrite_files: If you want re-download all files, optionnal, False at default (bool)
file_deleter: If you want dl older files, optionnal, False at default (bool)
logger_status: If you want enable/disable the logger, True at default (bool)
logger_name: If you want set the logger name, AsthoUpdater at default (str)
algorithm: If you want set the used algorithm, sha512 at default (str)
download_limit: Limit the number of files that can be downloaded simultaneously, 10 at default (int)
AsthoUpdater properties
get_total_files_to_download: Return total file to download (int)
get_total_files_downloaded: Return total files downloaded (int)
AsthoUpdater json example
If you not use sha512, you must change sha512 to the one you want.
{
"maintenance": "off",
"files": [
{
"sha512": "theSha512",
"name": "filename",
"url": "linkOfFile",
"path": "pathOfFile"
},
{
"sha512": "theSha512",
"name": "filename",
"url": "linkOfFile",
"path": "pathOfFile"
}
]
}
Author
License
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
AsthoUpdater-0.2.1.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for AsthoUpdater-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e24324e7475aefba93dd4697587c03c775af6a19993107e4d29a16ec1c009a06 |
|
MD5 | 408976dd68e943014c6286daf9133efc |
|
BLAKE2b-256 | 6d7fd12dfaa19245469cbb2b24fe455d5dfc8ed8ceb842fb31ad0d2ac5b2aa30 |