Skip to main content

requests-based file downloads with tqdm progress bars

Project description

PyPI-Status PyPI-Versions Build-Status Codecov LICENCE

requests-based file downloads with tqdm progress bars.

from tqdl import download
download(file_url, target_file_path)
 19%|█▊        | 20.5M/110M [00:06<00:29, 2.98MiB/s]

1 Installation

pip install tqdl

2 Features

  • Simple and straightforward API.

  • Installable from PyPI with pip install tqdl.

  • Tested on TravisCI against Linux, Windows and macOS, and Python versions 3.5 through 3.7.

  • The name - تقدّل - can be traslated as “get ahead”, which is awesome.

3 Use

tqdl contains a single funcion, aptly named download, which you can use to download files with a nice progress bar by providing it with a URL and a file path. Obviously, this is only useful for downloads of large files, and where you cae about showing the user (of your code/script/whatever) the progress of the ongoing download.

Here is a very straightforward example:

from tqdl import download
download(file_url, target_file_path)
 19%|█▊        | 20.5M/110M [00:06<00:29, 2.98MiB/s]

4 Contributing

Package author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.

4.1 Installing for development

Clone:

git clone git@github.com:shaypal5/tqdl.git

Install in development mode, including test dependencies:

cd tqdl
pip install -e '.[test]'

4.2 Running the tests

To run the tests use:

cd tqdl
pytest

4.3 Adding documentation

The project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings. When documenting code you add to this project, follow these conventions.

Additionally, if you update this README.rst file, use python setup.py checkdocs to validate it compiles.

5 Credits

Created by Shay Palachy (shay.palachy@gmail.com).

Based on a stackoverflow answer by user leovp.

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

tqdl-0.0.4.tar.gz (20.1 kB view hashes)

Uploaded Source

Built Distribution

tqdl-0.0.4-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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