aistore.sdk.obj.content_iterator.sequential

View as MarkdownOpen in Claude

Module Contents

Classes

NameDescription
ContentIterProviderProvide an iterator to open an HTTP response stream and read chunks of object content.

API

class aistore.sdk.obj.content_iterator.sequential.ContentIterProvider()

Bases: BaseContentIterProvider

Provide an iterator to open an HTTP response stream and read chunks of object content.

Parameters:

client
ObjectClient

Client for accessing contents of an individual object.

chunk_size
int

Size of each chunk of data yielded from the response stream.

aistore.sdk.obj.content_iterator.sequential.ContentIterProvider.create_iter(
offset: int = 0
) -> typing.Generator[bytes, None, None]

Create an iterator over the object content, applying an optional offset.

Parameters:

offset
intDefaults to 0

The offset in bytes to apply. If not provided, no offset is applied.

aistore.sdk.obj.content_iterator.sequential.ContentIterProvider.read_all() -> bytes

Read all object content in a single non-streamed request.