Skip to main content

download manager library

Project description

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.

Files for dlmanager, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size dlmanager-0.1.0-py2.py3-none-any.whl (2.7 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size dlmanager-0.1.0.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page