b2sdk.transfer.inbound.downloader.abstract
– Downloader base class
- class b2sdk.transfer.inbound.downloader.abstract.AbstractDownloader(force_chunk_size=None, min_chunk_size=None, max_chunk_size=None)[source]
Bases:
object
- REQUIRES_SEEKING = True
- is_suitable(download_version: b2sdk.file_version.DownloadVersion, allow_seeking: bool)[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).
- abstract download(file: io.IOBase, response: requests.models.Response, download_version: b2sdk.file_version.DownloadVersion, session: b2sdk.session.B2Session, encryption: Optional[b2sdk.encryption.setting.EncryptionSetting] = None)[source]
@returns (bytes_read, actual_sha1)