Skip to main content

download manager library

Project description

https://badge.fury.io/py/dlmanager.svg Documentation Status https://travis-ci.org/parkouss/dlmanager.svg?branch=master https://codecov.io/github/parkouss/dlmanager/coverage.svg?branch=master

dlmanager

dlmanager is Python 2 and 3 download manager library, with the following features:

  • Download files in background and in parallel
  • Cancel downloads
  • store downloads in a given directory, avoiding re-downloading files
  • Limit the size of this directory, removing oldest files

Example

from dlmanager import DownloadManager, PersistLimit

manager = DownloadManager(
    "dlmanager-destir",
    persist_limit=PersistLimit(
        size_limit=1073741824,  #  1 GB max
        file_limit=10,  # force to keep 10 files even if size_limit is reached
    )
)

# Start downloads in background
# Note that if files are already present, this is a no-op.
manager.download(url1)
manager.download(url2)

# Wait for completion
try:
    manager.wait()
except:
    manager.cancel()
    raise

Installation

Use pip:

pip install -U dlmanager

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
dlmanager-0.1.1-py2.py3-none-any.whl (3.1 kB) Copy SHA256 hash SHA256 Wheel 3.5 Feb 19, 2016
dlmanager-0.1.1.tar.gz (2.1 kB) Copy SHA256 hash SHA256 Source None Feb 19, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page