Skip to main content

A lib for update files written in Python.

Project description

AsthoUpdater

Made With Python Use git
PyPI version License Stars

A lib for update files written in Python.

Made with

Install

Execute the command:

pip3 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 astho_updater 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, optionnal, True at default (bool)
logger_name: If you want set the logger name, optionnal, 'astho_updater' at default (str)
logger_date_format: If you want set the logger name format, optionnal, '%H:%M:%S - %d/%m/%Y' at default (str)
algorithm: If you want set the used algorithm, optionnal, 'sha512' at default (str)
download_limit: Limit the number of files that can be downloaded simultaneously, optionnal, 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

{
  "maintenance": "off",
  "files": [
      {
        "checksum": "theChecksum",
        "name": "filename",
        "url": "linkOfFile",
        "path": "pathOfFile"
      },
      {
        "checksum": "theChecksum",
        "name": "filename",
        "url": "linkOfFile",
        "path": "pathOfFile"
      }
  ]
}

Author

Asthowen

License

AsthoUpdater | GNU General Public License v3.0

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.6.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

AsthoUpdater-0.2.6-py3-none-any.whl (17.5 kB view hashes)

Uploaded Python 3

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