Skip to main content

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

Metadata

Release files for downloadutil 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for downloadutil 1.0.4
File Size Uploaded
downloadutil-1.0.4.tar.gz 13.4 kB Details

Release files / downloadutil-1.0.4.tar.gz

Download URL downloadutil-1.0.4.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
735bc28c614c04210c4349831f13d829c9f73ed21038fd9da371ccc3350c935a
BLAKE2b-256 checksum
How to use checksums
5e0539fabca42b468abe70d93459421cdd1f0d10704570b2f0a0a431d8fe1ded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.4 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page