A simple downloader written in Python with an awesome progressbar.
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.
downloader-cli requires just one external module.
The script also allows some other values from the commandline.
usage: dw [-h] [-f | -c] [-e] [-q] SOURCE [TARGET] positional arguments: SOURCE URL of the file 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
Want to use it in your project?
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.
The module takes 8 arguments. Only one is required though.
|des||No||None (Current directory is selected and the name is extracted from the URL)|
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(
In case you want to experiment with the progress bar's icons, here's some examples.
This is when I passed
In case a file's size is not available from the server, the progressbar is indefinite.