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.mutations.AddToCell(family: [str](https://docs.python.org/3/library/stdtypes.html#str), qualifier: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str), value: [int](https://docs.python.org/3/library/functions.html#int), timestamp_micros: [int](https://docs.python.org/3/library/functions.html#int))

Bases: `google.cloud.bigtable.data.mutations.Mutation`

Adds an int64 value to an aggregate cell. The column family must be an
aggregate family and have an "int64" input type or this mutation will be
rejected.

Note: The timestamp values are in microseconds but must match the
granularity of the table (defaults to MILLIS). Therefore, the given value
must be a multiple of 1000 (millisecond granularity). For example:
1571902339435000.

- **Parameters**

  - **family** -- The name of the column family to which the cell belongs.

  - **qualifier** -- The column qualifier of the cell.

  - **value** -- The value to be accumulated into the cell.

  - **timestamp_micros** -- The timestamp of the cell. Must be provided for
    cell aggregation to work correctly.

- **Raises**

  - [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) -- If qualifier is not bytes or str.

  - [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) -- If value is not int.

  - [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) -- If timestamp_micros is not int.

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- If value is out of bounds for a 64-bit signed int.

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- If timestamp_micros is less than 0.

#### is_idempotent()

Check if the mutation is idempotent

Idempotent mutations can be safely retried on failure.

- **Returns**

  True if the mutation is idempotent, False otherwise.
- **Return type**

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

### *class* google.cloud.bigtable.data.mutations.DeleteAllFromFamily(family_to_delete: [str](https://docs.python.org/3/library/stdtypes.html#str))

Bases: `google.cloud.bigtable.data.mutations.Mutation`

Mutation to delete all cells from a column family.

- **Parameters**

  **family_to_delete** -- The name of the column family to delete.

### *class* google.cloud.bigtable.data.mutations.DeleteAllFromRow()

Bases: `google.cloud.bigtable.data.mutations.Mutation`

Mutation to delete all cells from a row.

### *class* google.cloud.bigtable.data.mutations.DeleteRangeFromColumn(family: [str](https://docs.python.org/3/library/stdtypes.html#str), qualifier: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), start_timestamp_micros: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[int](https://docs.python.org/3/library/functions.html#int)\] = None, end_timestamp_micros: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[int](https://docs.python.org/3/library/functions.html#int)\] = None)

Bases: `google.cloud.bigtable.data.mutations.Mutation`

Mutation to delete a range of cells from a column.

- **Parameters**

  - **family** -- The name of the column family.
    qualifier: The column qualifier.

  - **start_timestamp_micros** -- The start timestamp of the range to
    delete. None represents 0. Defaults to None.

  - **end_timestamp_micros** -- The end timestamp of the range to
    delete. None represents infinity. Defaults to None.

- **Raises**

  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- If start_timestamp_micros is greater than end_timestamp_micros.

### *class* google.cloud.bigtable.data.mutations.Mutation()

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

Abstract base class for mutations.

This class defines the interface for different types of mutations that can be
applied to Bigtable rows.

#### _*str_*()

Return a string representation of the mutation.

- **Returns**

  A string representation of the mutation.
- **Return type**

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

#### is_idempotent()

Check if the mutation is idempotent

Idempotent mutations can be safely retried on failure.

- **Returns**

  True if the mutation is idempotent, False otherwise.
- **Return type**

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

#### size()

Get the size of the mutation in bytes

- **Returns**

  The size of the mutation in bytes.
- **Return type**

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

### *class* google.cloud.bigtable.data.mutations.RowMutationEntry(row_key: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str), mutations: google.cloud.bigtable.data.mutations.Mutation \| [list](https://docs.python.org/3/library/stdtypes.html#list)\[google.cloud.bigtable.data.mutations.Mutation\])

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

A single entry in a MutateRows request.

This class represents a set of mutations to apply to a specific row in a
Bigtable table.

- **Parameters**

  - **row_key** -- The key of the row to mutate.

  - **mutations** -- The mutation or list of mutations to apply
    to the row.

- **Raises**

  [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- If mutations is empty or contains more than
  _MUTATE_ROWS_REQUEST_MUTATION_LIMIT mutations.

#### is_idempotent()

Check if all mutations in the entry are idempotent.

- **Returns**

  True if all mutations in the entry are idempotent, False otherwise.
- **Return type**

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

#### size()

Get the size of the mutation entry in bytes.

- **Returns**

  The size of the mutation entry in bytes.
- **Return type**

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

### *class* google.cloud.bigtable.data.mutations.SetCell(family: [str](https://docs.python.org/3/library/stdtypes.html#str), qualifier: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str), new_value: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str) \| [int](https://docs.python.org/3/library/functions.html#int), timestamp_micros: [Optional](https://docs.python.org/3/library/typing.html#typing.Optional)\[[int](https://docs.python.org/3/library/functions.html#int)\] = None)

Bases: `google.cloud.bigtable.data.mutations.Mutation`

Mutation to set the value of a cell.

- **Parameters**

  - **family** -- The name of the column family to which the new cell belongs.

  - **qualifier** -- The column qualifier of the new cell.

  - **new_value** -- The value of the new cell.

  - **timestamp_micros** -- The timestamp of the new cell. If None,
    the current timestamp will be used. Timestamps will be sent with
    millisecond precision. Extra precision will be truncated. If -1, the
    server will assign a timestamp. Note that SetCell mutations with
    server-side timestamps are non-idempotent operations and will not be retried.

- **Raises**

  - [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) -- If qualifier is not bytes or str.

  - [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError) -- If new_value is not bytes, str, or int.

  - [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- If timestamp_micros is less than _SERVER_SIDE_TIMESTAMP.

#### is_idempotent()

Check if the mutation is idempotent

Idempotent mutations can be safely retried on failure.

- **Returns**

  True if the mutation is idempotent, False otherwise.
- **Return type**

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