b2sdk.transferer.transferer
– Manager of downloaders¶
-
class
b2sdk.transferer.transferer.
Transferer
(session, account_info)[source]¶ Bases:
object
Handle complex actions around downloads and uploads to free raw_api from that responsibility.
-
DEFAULT_MAX_STREAMS
= 8¶
-
DEFAULT_MIN_PART_SIZE
= 104857600¶
-
MIN_CHUNK_SIZE
= 8192¶
-
MAX_CHUNK_SIZE
= 1048576¶
-
__init__
(session, account_info)[source]¶ - Parameters
max_streams – limit on a number of streams to use when downloading in multiple parts
min_part_size – the smallest part size for which a stream will be run when downloading in multiple parts
-
download_file_from_url
(url, download_dest, progress_listener=None, range_=None)[source]¶ - Parameters
url – url from which the file should be downloaded
download_dest – where to put the file when it is downloaded
progress_listener – where to notify about progress downloading
range – 2-element tuple containing data of http Range header
-