StorageStreamDownloader class

Definition

A streaming object to download from Azure Storage.

StorageStreamDownloader(downloader)
Inheritance
builtins.object
StorageStreamDownloader

Variables

name
str
The name of the file being downloaded.
properties
FileProperties
The properties of the file being downloaded. If only a range of the data is being downloaded, this will be reflected in the properties.
size
int
The size of the total data in the stream. This will be the byte range if speficied, otherwise the total size of the file.

Methods

chunks
readall

Download the contents of this file.

This operation is blocking until all data is downloaded. :rtype: bytes or str

readinto

Download the contents of this file to a stream.

chunks

chunks()

readall

Download the contents of this file.

This operation is blocking until all data is downloaded. :rtype: bytes or str

readall()

readinto

Download the contents of this file to a stream.

readinto(stream)

Parameters

stream
Required

The stream to download to. This can be an open file-handle, or any writable stream. The stream must be seekable if the download uses more than one parallel connection.

Returns

The number of bytes read.

Return type

int