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.

Source Distribution

dlmanager-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

dlmanager-0.1.0-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for dlmanager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 11710f396fb756457f3bcd958b0f4961bb123ee9cd39a9f633a1d144da9f6d56
MD5 18310a34872d8b26188f271178b26b03
BLAKE2b-256 f1d464c42a38a286b24172372f132fe71841c4f192dc5ed8f5f3af0f8290aa81

See more details on using hashes here.

File details

Details for the file dlmanager-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dlmanager-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c5e300a52e08740318da6bb84c073661cefa7b1bd77f8ac852f0ce6e8e759afd
MD5 bec874a78f2ca8a89819ad672fd576df
BLAKE2b-256 8b55fab0aebe20e9f3eb5c61962b73bfe7a5339915c6094140ecb7a9545f148a

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