b2sdk.transfer.inbound.downloader.abstract – Downloader base class

class b2sdk.transfer.inbound.downloader.abstract.EmptyHasher(*args, **kwargs)[source]

Bases: object

__init__(*args, **kwargs)[source]
update(data)[source]
digest()[source]
hexdigest()[source]
copy()[source]
class b2sdk.transfer.inbound.downloader.abstract.AbstractDownloader(thread_pool=None, force_chunk_size=None, min_chunk_size=None, max_chunk_size=None, align_factor=None, check_hash=True, **kwargs)[source]

Bases: object

Parameters:
REQUIRES_SEEKING = True
DEFAULT_THREAD_POOL_CLASS

alias of ThreadPoolExecutor

DEFAULT_ALIGN_FACTOR = 4096
__init__(thread_pool=None, force_chunk_size=None, min_chunk_size=None, max_chunk_size=None, align_factor=None, check_hash=True, **kwargs)[source]
Parameters:
is_suitable(download_version, allow_seeking)[source]

Analyze download_version (possibly against options passed earlier to constructor to find out whether the given download request should be handled by this downloader).

Parameters:
abstract download(file, response, download_version, session, encryption=None)[source]

@returns (bytes_read, actual_sha1)

Parameters: