Skip to main content

Python downloader with progress

Project description

Homura

Homura (ほむら) is a Python downloader with progress, which can be used to download large files.

It is named after Homura Akemi.

Features

  • PycURL based

  • Resume downloads (if server supports byte ranges on the resource)

  • Support for requests.Session

Installation

Homura depends on PycURL. Install dependencies before installing the python package:

Ubuntu

$ sudo apt-get install libcurl4-openssl-dev python-dev

Fedora

$ sudo yum groupinstall "Development Tools"
$ sudo yum install libcurl libcurl-devel python-devel

Then, install homura

$ pip install homura

Usage

The simplest usage is to import the utility function download:

>>> from homura import download
>>> download('http://download.thinkbroadband.com/200MB.zip')
    3%      6.2 MiB     739.5 KiB/s            0:04:28 ETA

To specify path for downloaded file:

>>> download(url='http://download.thinkbroadband.com/200MB.zip',
             path='/path/to/big.zip')

You can specify extra headers as a dictionary:

>>> download(url='http://example.com', headers={'API-Key': '123456'})

Or you can work with Session objects of the requests library:

>>> import requests
>>> s = requests.Session()
# Do some work with `s` and send requests
>>> download(url='http://example.com', session=s)

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

homura-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file homura-0.1.0.tar.gz.

File metadata

  • Download URL: homura-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for homura-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e683d99c2651dee26269a55e677a2dc403f1da317c9b6bf6653d15bfc288c59c
MD5 8c3c42590de020b1af0b108992b7e10f
BLAKE2b-256 44429995f6b1d272e795da797e03a55abfbceb0b9b9f655b0a5e0f6e407dc9f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page