2.42.0 (latest) 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.1 2.29.0 2.28.1 2.26.0 2.25.0 2.24.0 2.23.1 2.22.0 2.21.0 2.20.0 2.19.0 2.18.1 2.17.0 2.16.0 2.15.0 2.14.1 2.13.2 2.12.0 2.11.3 2.10.1 2.9.0 2.8.1 2.7.1 2.6.0 2.5.2 2.4.0 2.3.3 2.2.0 2.1.0 2.0.0 1.7.3 1.6.1 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.0 0.34.0

### *class* google.cloud.bigtable.data.read_rows_query.ReadRowsQuery(row_keys: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[Union](https://docs.python.org/3/library/typing.html#typing.Union)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[[str](https://docs.python.org/3/library/stdtypes.html#str) \| [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)\], [str](https://docs.python.org/3/library/stdtypes.html#str), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)\]\] = None, row_ranges: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[Union](https://docs.python.org/3/library/typing.html#typing.Union)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[google.cloud.bigtable.data.read_rows_query.RowRange\], google.cloud.bigtable.data.read_rows_query.RowRange\]\] = None, limit: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[int](https://docs.python.org/3/library/functions.html#int)\] = None, row_filter: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[google.cloud.bigtable.data.row_filters.RowFilter](https://docs.cloud.google.com/python/docs/reference/bigtable/latest/common_data_row_filters#google.cloud.bigtable.data.row_filters.RowFilter)\] = None)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Class to encapsulate details of a read row request

- **Parameters**

  - **row_keys** -- row keys to include in the query
    a query can contain multiple keys, but ranges should be preferred

  - **row_ranges** -- ranges of rows to include in the query

  - **limit** -- the maximum number of rows to return. None or 0 means no limit
    default: None (no limit)

  - **row_filter** -- a RowFilter to apply to the query

#### _*eq_*(other)

RowRanges are equal if they have the same row keys, row ranges,
filter and limit, or if they both represent a full scan with the
same filter and limit

- **Parameters**

  **other** -- the object to compare to
- **Returns**

  True if the objects are equal, False otherwise
- **Return type**

  [bool](https://docs.python.org/3/library/functions.html#bool)

#### add_key(row_key: [str](https://docs.python.org/3/library/stdtypes.html#str) \| [bytes](https://docs.python.org/3/library/stdtypes.html#bytes))

Add a row key to this query

A query can contain multiple keys, but ranges should be preferred

- **Parameters**

  **row_key** -- a key to add to this query
- **Raises**

  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- if an input is not a string or bytes

#### add_range(row_range: google.cloud.bigtable.data.read_rows_query.RowRange)

Add a range of row keys to this query.

- **Parameters**

  **row_range** -- a range of row keys to add to this query

#### *property* filter(*: [google.cloud.bigtable.data.row_filters.RowFilter](https://docs.cloud.google.com/python/docs/reference/bigtable/latest/common_data_row_filters#google.cloud.bigtable.data.row_filters.RowFilter) \| \[None\](<https://docs.python.org/3/library/constants.html#None>* )

Return the RowFilter applied to this query

- **Returns**

  the RowFilter applied to this query
- **Return type**

  [RowFilter](https://docs.cloud.google.com/python/docs/reference/bigtable/classic_client/row-filters.md#google.cloud.bigtable.row_filters.RowFilter) \| None

#### *property* limit(*: [int](https://docs.python.org/3/library/functions.html#int) \| \[None\](<https://docs.python.org/3/library/constants.html#None>* )

Return the maximum number of rows to return by this query

None or 0 means no limit

- **Returns**

  the maximum number of rows to return by this query
- **Return type**

  [int](https://docs.python.org/3/library/functions.html#int) \| None

#### *property* row_keys(*: [list](https://docs.python.org/3/library/stdtypes.html#list)\[[bytes](https://docs.python.org/3/library/stdtypes.html#bytes)* )

Return the row keys in this query

- **Returns**

  the row keys in this query
- **Return type**

  [list](https://docs.python.org/3/library/stdtypes.html#list)\[[bytes](https://docs.python.org/3/library/stdtypes.html#bytes)\]

#### *property* row_ranges(*: [list](https://docs.python.org/3/library/stdtypes.html#list)\[google.cloud.bigtable.data.read_rows_query.RowRange* )

Return the row ranges in this query

- **Returns**

  the row ranges in this query
- **Return type**

  [list](https://docs.python.org/3/library/stdtypes.html#list)\[RowRange\]

#### shard(shard_keys: RowKeySamples)

Split this query into multiple queries that can be evenly distributed
across nodes and run in parallel

- **Parameters**

  **shard_keys** -- a list of row keys that define the boundaries of segments.
- **Returns**

  a ShardedQuery that can be used in sharded_read_rows calls
- **Return type**

  ShardedQuery
- **Raises**

  [**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError) -- if the query contains a limit

### *class* google.cloud.bigtable.data.read_rows_query.RowRange(start_key: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[Union](https://docs.python.org/3/library/typing.html#typing.Union)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)\]\] = None, end_key: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[Union](https://docs.python.org/3/library/typing.html#typing.Union)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)\]\] = None, start_is_inclusive: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[bool](https://docs.python.org/3/library/functions.html#bool)\] = None, end_is_inclusive: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[bool](https://docs.python.org/3/library/functions.html#bool)\] = None)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Represents a range of keys in a ReadRowsQuery

- **Parameters**

  - **start_key** -- The start key of the range. If empty, the range is unbounded on the left.

  - **end_key** -- The end key of the range. If empty, the range is unbounded on the right.

  - **start_is_inclusive** -- Whether the start key is inclusive. If None, the start key is
    inclusive.

  - **end_is_inclusive** -- Whether the end key is inclusive. If None, the end key is not inclusive.

- **Raises**

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- if start_key is greater than end_key, or start_is_inclusive

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- if end_is_inclusive is set when the corresponding key is None

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- if start_key or end_key is not a string or bytes.

#### _*bool_*()

Empty RowRanges (representing a full table scan) are falsy, because
they can be substituted with None. Non-empty RowRanges are truthy.

- **Returns**

  True if the RowRange is not empty, False otherwise
- **Return type**

  [bool](https://docs.python.org/3/library/functions.html#bool)

#### _*str_*()

Represent range as a string, e.g. "\[b'a', b'z)"

Unbounded start or end keys are represented as "-inf" or "+inf"

- **Returns**

  The string representation of the range
- **Return type**

  [str](https://docs.python.org/3/library/stdtypes.html#str)

#### *property* end_is_inclusive(*: \[bool\](<https://docs.python.org/3/library/functions.html#bool>* )

Indicates if the range is inclusive of the end key.

If the range is unbounded on the right, this will return True.

- **Returns**

  Whether the range is inclusive of the end key.
- **Return type**

  [bool](https://docs.python.org/3/library/functions.html#bool)

#### *property* end_key(*: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| \[None\](<https://docs.python.org/3/library/constants.html#None>* )

Returns the end key of the range. If None, the range is unbounded on the right.

- **Returns**

  The end key of the range, or None if the range is unbounded on the right.
- **Return type**

  [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| None

#### *property* start_is_inclusive(*: \[bool\](<https://docs.python.org/3/library/functions.html#bool>* )

Indicates if the range is inclusive of the start key.

If the range is unbounded on the left, this will return True.

- **Returns**

  Whether the range is inclusive of the start key.
- **Return type**

  [bool](https://docs.python.org/3/library/functions.html#bool)

#### *property* start_key(*: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| \[None\](<https://docs.python.org/3/library/constants.html#None>* )

Returns the start key of the range. If None, the range is unbounded on the left.