Skip to main content

Common utilities for downloading and extracting archives

Project description

downloadutil

A Python module with common utilities for downloading and extracting archives.

Use cases:

  • Download an archive from a URL and the expected SHA256 checksum from the same URL with a ".sha256" suffix appended. Verify the checksum.
  • Download an archive as above and extract it into a target directory, and still keep the archive in a special cache directory.

Usage as a command-line tool

Invoke as downloadutil or python3 -m downloadutil.

usage: downloadutil [-h] --url URL [--dest-dir-parent DEST_DIR_PARENT] [--cache-dir CACHE_DIR] [--no-cache] [--verify-checksum] [--verbose]

options:
  -h, --help            show this help message and exit
  --url URL             URL to download.
  --dest-dir-parent DEST_DIR_PARENT
                        Parent directory in which to extract the archive
  --cache-dir CACHE_DIR
                        Download cache directory on the locally mounted disk. Must have enough space.
  --no-cache            Do not use a cache directory
  --verify-checksum     In addition to downloading the given URL, also download the SHA256 checksum file from the URL obtained by appending an .sha256 suffix, and verifying the checksum.
  --verbose             Verbose logging

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

downloadutil-1.0.4.tar.gz (13.4 kB view details)

Uploaded Source

File details

Details for the file downloadutil-1.0.4.tar.gz.

File metadata

  • Download URL: downloadutil-1.0.4.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for downloadutil-1.0.4.tar.gz
Algorithm Hash digest
SHA256 735bc28c614c04210c4349831f13d829c9f73ed21038fd9da371ccc3350c935a
MD5 7eec0d2a9827db87fa879b00d3a64246
BLAKE2b-256 5e0539fabca42b468abe70d93459421cdd1f0d10704570b2f0a0a431d8fe1ded

See more details on using hashes here.

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