b2sdk.transfer.inbound.download_manager – Manager of downloaders

class b2sdk.transfer.inbound.download_manager.DownloadManager(write_buffer_size=None, check_hash=True, max_download_streams_per_file=None, **kwargs)[source]

Bases: TransferManager, ThreadPoolMixin

Handle complex actions around downloads to free raw_api from that responsibility.

Parameters:
DEFAULT_MIN_PART_SIZE = 104857600
MIN_CHUNK_SIZE = 8192
MAX_CHUNK_SIZE = 1048576
PARALLEL_DOWNLOADER_CLASS

alias of ParallelDownloader

SIMPLE_DOWNLOADER_CLASS

alias of SimpleDownloader

__init__(write_buffer_size=None, check_hash=True, max_download_streams_per_file=None, **kwargs)[source]

Initialize the DownloadManager using the given services object.

Parameters:
download_file_from_url(url, progress_listener=None, range_=None, encryption=None)[source]
Parameters:
  • url – url from which the file should be downloaded

  • progress_listener – where to notify about downloading progress

  • range – 2-element tuple containing data of http Range header

  • encryption (Optional[EncryptionSetting]) – encryption setting (None if unknown)

  • encryption

Return type:

DownloadedFile