Share via


BlobQueryReader Class

A streaming object to read query results.

Constructor

BlobQueryReader(name: str = None, container: str = None, errors: Any = None, record_delimiter: str = '\n', encoding: str | None = None, headers: Dict[str, Any] = None, response: Any = None, error_cls: Type[BlobQueryError] = None)

Parameters

Name Description
name
Default value: None
container
Default value: None
errors
Default value: None
record_delimiter
Default value:
encoding
Default value: None
headers
Default value: None
response
Default value: None
error_cls
Default value: None

Methods

readall

Return all query results.

This operation is blocking until all data is downloaded.

readinto

Download the query result to a stream.

records

Returns a record generator for the query result.

Records will be returned line by line.

readall

Return all query results.

This operation is blocking until all data is downloaded.

readall() -> bytes

Returns

Type Description

The query results.

readinto

Download the query result to a stream.

readinto(stream: IO) -> None

Parameters

Name Description
stream
Required
IO

The stream to download to. This can be an open file-handle, or any writable stream.

Returns

Type Description

None

records

Returns a record generator for the query result.

Records will be returned line by line.

records() -> Iterable[bytes]

Returns

Type Description

A record generator for the query result.

Attributes

container

The name of the container where the blob is.

container: str

name

The name of the blob being queried.

name: str

record_delimiter

The delimiter used to separate lines, or records with the data. The records method will return these lines via a generator.

record_delimiter: str

response_headers

The response_headers of the quick query request.

response_headers: Dict[str, Any]