2.44.0 (latest) 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.2 2.35.0 2.34.0 2.33.1 2.32.0 2.31.0 2.30.0 2.29.1 2.28.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.1 2.18.1 2.17.0 2.16.2 2.15.0 2.14.2 2.13.2 2.12.0 2.11.0 2.10.1 2.9.1 2.8.0 2.7.0 2.6.3 2.5.0 2.4.0 2.3.0 2.2.1 2.1.0 2.0.1 1.1.2 1.0.0 0.8.0 0.7.0 0.6.0 API documentation for `bigquery_storage_v1.reader` module.

## Classes

### [ReadRowsIterable](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.reader.ReadRowsIterable.md.txt)

```python
ReadRowsIterable(reader, read_session=None)
```
An iterable of rows from a read session.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `reader` | `google.cloud.bigquery_storage_v1.reader.ReadRowsStream` A read rows stream. |
| `read_session` | `Optional[ReadSession]` This argument was used to specify the schema of the rows in the stream, but now the first message in a read stream contains this information. When row_restriction is applied, some streams may be empty without read_session info. Provide this argument to avoid an error. For more information, see <https://github.com/googleapis/python-bigquery-storage/issues/733ß> |

### [ReadRowsPage](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.reader.ReadRowsPage.md.txt)

```python
ReadRowsPage(stream_parser, message)
```
An iterator of rows from a read session message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `stream_parser` | `google.cloud.bigquery_storage_v1.reader._StreamParser` A helper for parsing messages into rows. |
| `message` | `google.cloud.bigquery_storage_v1.types.ReadRowsResponse` A message of data from a read rows stream. |

### [ReadRowsStream](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.reader.ReadRowsStream.md.txt)

```python
ReadRowsStream(
    client,
    name,
    offset,
    read_rows_kwargs,
    retry_delay_callback=None,
    *,
    request_template=None
)
```
A stream of results from a read rows request.

This stream is an iterable of
[ReadRowsResponse](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.types.ReadRowsResponse.md.txt).
Iterate over it to fetch all row messages.

If the fastavro library is installed, use the
[rows()](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.reader.ReadRowsStream.md.txt)
method to parse all messages into a stream of row dictionaries.

If the pandas and fastavro libraries are installed, use the
[to_dataframe()](https://docs.cloud.google.com/python/docs/reference/bigquerystorage/latest/google.cloud.bigquery_storage_v1.reader.ReadRowsStream.md.txt)
method to parse all messages into a `pandas.DataFrame`.

Use the stream as a context manager to cancel the `ReadRows` call if
reading stops before the end of the stream::

    with client.read_rows(stream_name) as stream:
        for message in stream:
            ...

This object should not be created directly, but is returned by
other methods in this library.