> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/aistore/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/aistore/_mcp/server.

# aistore.sdk.batch.multipart.body_stream_reader

## Module Contents

### Classes

| Name                                                                                   | Description                                                     |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`BodyStreamReader`](#aistore-sdk-batch-multipart-body_stream_reader-BodyStreamReader) | Stream reader that only reads the body portion of a part from a |

### API

```python
class aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader(
    buffer_reader: aistore.sdk.batch.multipart.multipart_stream_buffer.MultipartStreamBuffer
)
```

**Bases:** `BufferedIOBase`

Stream reader that only reads the body portion of a part from a
buffered multipart stream. This class extends BufferedIOBase and
provides a read-only interface for consuming multipart body content
until a boundary is encountered.

```python
aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader.close() -> None
```

Close the reader.

```python
aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader.read(
    size: int = -1
) -> bytes
```

Read up to size bytes from the stream.

For multipart streams, this respects logical boundaries and may return
more data than requested to maintain boundary integrity.

**Parameters:**

Number of bytes to read. If size is omitted, None, or
negative read as much as possible. Defaults to -1.

**Returns:** `bytes`

Data read from the stream.

```python
aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader.readable() -> bool
```

Return True if the stream is readable.

```python
aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader.seekable() -> bool
```

Return False as this stream does not support seeking.

```python
aistore.sdk.batch.multipart.body_stream_reader.BodyStreamReader.writable() -> bool
```

Return False as this stream is read-only.