Skip to main content

downloader-cli

A simple downloader written in Python with an awesome progressbar.


Installation   |   Requirements   |   Usage   |   Use It   |   Other examples   

forthebadge made-with-python

License Downloads PyPI AUR PRs Welcome

Installation

The package is available in PyPi here

Install it using

pip install downloader-cli

If you want to manuall install, clone the repo and run the following command

sudo python setup.py install

The packages available in PyPi and AUR contain the last release, if you want all the latest changes, clone the repo and install manually or wait for the next release.

Requirements

downloader-cli requires just one external module.

Usage

The script also allows some other values from the commandline.

usage: dw [-h] [-f | -c] [-e] [-q] [-v] SOURCE [TARGET]

positional arguments:
  SOURCE           URL of the file. Alternately a file containing URL's with
                   each URL in a new line can be passed.
  TARGET           target filepath (existing directories will be treated as
                   the target location)

optional arguments:
  -h, --help       show this help message and exit
  -f, -o, --force  overwrite if the file already exists
  -c, --resume     resume failed or cancelled download (partial sanity check)
  -e, --echo       print the filepath to stdout after downloading (other
                   output will be redirected to stderr)
  -q, --quiet      suppress filesize and progress info
  -v, --version    Show the current version

Use It

Want to use it in your project?

Import the Download class using the following.

from downloader_cli.download import Download
Download(url).download()

Above is the simplest way to use it in your app. The other arguments are optional.

Arguments

The module takes various arguments. Only one is required though.

Name required default
URL/file Yes
des No None (Current directory is selected and the name is extracted from the URL)
overwrite No False
continue_download No False
echo No False
quiet No False
icon_done No
icon_left No
icon_border No | (If a single char is passed, it will be used for both the right and left border. If a string of 2 chars are passed, 1st char will be used as left border and the 2nd as the right border)

NOTE For details regarding the arguments, check Usage

NOTE In case the file size is not available, the bar is shown as indefinite, in which case the icon_left by default space(" ").

Other examples

In case you want to experiment with the progress bar's icons, here's some examples.

  • This is when I passed icon_done as # and icon_left as space.

  • In case a file's size is not available from the server, the progressbar is indefinite.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

downloader_cli-0.2.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

downloader_cli-0.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file downloader_cli-0.2.0.tar.gz.

File metadata

  • Download URL: downloader_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.5

File hashes

Hashes for downloader_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d3152cc3a6f07a3c628e88a1c5f032b7373e5d6c89025ab575c99f38b7e12c65
MD5 e393f581f16fd0503a5c5ec275c27e90
BLAKE2b-256 ce880606e524569224129acaac938a62b49cd672ebf2d2f196090beb5e31de00

See more details on using hashes here.

File details

Details for the file downloader_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: downloader_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.5

File hashes

Hashes for downloader_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6f95bc8daae88b2a60c251d813fd6aea790160adff42e67ba91f99a41be3298
MD5 f3e40276d037372e8242df692483c3c3
BLAKE2b-256 860c3fd34b2e4c7a4c4b354ff9f6a81737c15ead8ff51e1226fc575a9271021b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.4

2 files

0.3.3

2 files

0.3.2.post1

2 files

0.3.2

2 files

0.3.1

2 files

This release

0.2.0 This release

2 files

0.1.0.post2

2 files

0.1.0

1 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