跳转到主要内容

下载和提取存档的常用工具

项目描述

downloadutil

一个Python模块,包含下载和提取存档的常用工具。

用例

  • 从URL下载存档以及从同一URL(添加".sha256"后缀)下载预期的SHA256校验和。验证校验和。
  • 如上所述下载存档并将其提取到目标目录,同时仍保留存档在特殊缓存目录中。

作为命令行工具使用

作为 downloadutilpython3 -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

项目详细信息


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分发

downloadutil-1.0.4.tar.gz (13.4 kB 查看散列)

上传于 来源

由以下支持