Skip to main content

A Simple Robust Downloader written in Python

Project description

Robust Downloader

A minimal Python downloader with robustness in mind - resumable downloads, retries, and more.

Installation

pip install robust-downloader

Usage

From Python

from robust_downloader import download

download("https://raw.githubusercontent.com/fedebotu/robust-downloader/main/README.md")

From CLI

$ robust-downloader --help
usage: robust-downloader [-h] [-V] [--folder FOLDER] [--filename FILENAME] [--key KEY]
                         [--proxy PROXY] [--md5 MD5]
                         [--max-redirect-hops MAX_REDIRECT_HOPS] [--verify VERIFY]
                         [--timeout TIMEOUT] [--retry-max RETRY_MAX]
                         [--sleep-max SLEEP_MAX] [--chunk-size CHUNK_SIZE]
                         [--show-progress SHOW_PROGRESS] [--logging-level LOGGING_LEVEL]
                         url

Example:

$ robust-downloader https://raw.githubusercontent.com/fedebotu/robust-downloader/main/README.md

Available Arguments

positional arguments:
  url                   url to download

options:
  -h, --help            show this help message and exit
  -V, --version         display version (default: None)
  --folder FOLDER       folder to save the file (default: None)
  --filename FILENAME   filename to save the file (default: None)
  --key KEY             key to decrypt the file (default: None)
  --proxy PROXY         proxy to use (default: None)
  --md5 MD5             md5 to check the file (default: None)
  --max-redirect-hops MAX_REDIRECT_HOPS
                        max redirect hops (default: 3)
  --verify VERIFY       verify the file (default: None)
  --timeout TIMEOUT     timeout in seconds (default: 60)
  --retry-max RETRY_MAX
                        retry max in seconds (default: 500)
  --sleep-max SLEEP_MAX
                        sleep max in seconds (default: 120)
  --chunk-size CHUNK_SIZE
                        chunk size (default: 1024)
  --show-progress SHOW_PROGRESS
                        show progress (default: True)
  --logging-level LOGGING_LEVEL
                        logging level (default: 20)

Acknowledgements

This repository was inspired by gdown.

Contributing

Feel free to contribute to this repository by creating a pull request or submitting an issue!

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

robust-downloader-0.0.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

robust_downloader-0.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file robust-downloader-0.0.1.tar.gz.

File metadata

  • Download URL: robust-downloader-0.0.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for robust-downloader-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b1ecb59fc2a0a47bb0f1be4e56fbf625d274fed398d046eef0bf6435383042f6
MD5 9ec9f586dfbe56e177e25062df9b4d86
BLAKE2b-256 be9a10e4c51542f8e91947791349e29aba01bd95eb69236b0e80f2ff60fd3626

See more details on using hashes here.

File details

Details for the file robust_downloader-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for robust_downloader-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3d449ccb2207093a9bb1ae9333c68996d266c60c1d0d1ba41916244ee0f20d3
MD5 44c7ca559c4a741b02b08a2c2695a2ee
BLAKE2b-256 560e61343f3673fc9dcd4c6e87c77c9ec081f900b9678a2363bd0e1228348947

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