Skip to main content

Python package to download files

Project description

https://img.shields.io/pypi/v/requests_downloader?color=success Documentation Status Python Version Support GitHub Issues GitHub Followers Twitter Followers

Python package to download files

Features

  • Hassle-free download using requests

  • Download from Drive, Dropbox, Archive or direct URLs

  • No need to specify a name for the file to be downloaded

  • Command Line Interface to download

  • External requests.Session object can be passed

Usage

Use in a Project

Get multiple download options (e.g. for archive.org links):

from requests_downloader import downloader
download_urls, default_idx = downloader.handle_url('<url>')

Download a file:

from requests_downloader import downloader
downloader.download('<download_url>')

Use Console Interface

usage: smart-dl [-h] [--download_dir DOWNLOAD_DIR] [--download_file DOWNLOAD_FILE]
                [--download_path DOWNLOAD_PATH] [--block BLOCK] [--timeout TIMEOUT]
                [--resume] [--progress] [--checksum CHECKSUM] [--verbose] [--debug]
                [--version] url

positional arguments:
url                   Download URL

optional arguments:
-h, --help            show this help message and exit
--download_dir DOWNLOAD_DIR
                        Specify downloads directory
--download_file DOWNLOAD_FILE
                        Specify filename
--download_path DOWNLOAD_PATH
                        Specify path (ignores _dir or _file arguments)
--block BLOCK         Block size while writing the file, in bytes
--timeout TIMEOUT     Timeout in seconds
--resume              Try to resume the download, if supported
--progress            Show download progressbar
--checksum CHECKSUM   Checksum to verify integrity of the download
--verbose             Enable verbose output
--debug               Enable debug information
--version             show program's version number and exit

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.4.0 (2022-04-28)

  • Option to show filename to the left of progressbar

  • Modularize code

  • Style: Black

  • Fix bugs

0.3.0 (2022-02-11)

  • Several documentation updates

  • Code refactoring

  • Change console command from clunky requests_downloader to smart-dl

0.2.0 (2021-06-08)

  • Improvements in content disposition and content length handling

  • Logging improvements

0.1.7 (2021-06-07)

  • Minor bugfixes and spelling corrections.

0.1.5 (2020-11-03)

  • Support for Google Docs (Document, Spreadsheets, Presentations).

0.1.4 (2020-09-07)

  • Bugfixes.

  • First Alpha release.

0.1.0 (2020-09-05)

  • First release on PyPI.

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

requests_downloader-0.4.1.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

requests_downloader-0.4.1-py2.py3-none-any.whl (11.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file requests_downloader-0.4.1.tar.gz.

File metadata

  • Download URL: requests_downloader-0.4.1.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11

File hashes

Hashes for requests_downloader-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e2d3871453b74719f3af554605f5d70fbe5bf881cf5afde0c3aef433eafc79cd
MD5 a2e7c286e289de93eb6e2c98b44806a8
BLAKE2b-256 8a53f647d2c7c9542bba2d7c158f3314bf89a92532209cba843a46a946a63008

See more details on using hashes here.

File details

Details for the file requests_downloader-0.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: requests_downloader-0.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.11

File hashes

Hashes for requests_downloader-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cd904e1bec46da8726cbfabdf8668f6bdfedf096f6b4e64f8b47f827f9aad49a
MD5 4f0f8eadc634e0eec26488f3beaca112
BLAKE2b-256 4c80ce72f4d0a189f1c3078150a7e07d7ef42068841dd621c0aee4cb500c3d87

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