As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Transforms

Helpful constants to use for Google Cloud Firestore.

class google.cloud.firestore_v1.transforms.ArrayRemove(values)[source]

Bases: google.cloud.firestore_v1.transforms._ValueList

Field transform: remove values from an array field.

See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array

Parameters

values (List | Tuple) – values to remove.

class google.cloud.firestore_v1.transforms.ArrayUnion(values)[source]

Bases: google.cloud.firestore_v1.transforms._ValueList

Field transform: appends missing values to an array field.

See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements

Parameters

values (List | Tuple) – values to append.

class google.cloud.firestore_v1.transforms.Increment(value)[source]

Bases: google.cloud.firestore_v1.transforms._NumericValue

Field transform: increment a numeric field with specified value.

See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.increment

Parameters

value (int | float) – value used to increment the field.

class google.cloud.firestore_v1.transforms.Maximum(value)[source]

Bases: google.cloud.firestore_v1.transforms._NumericValue

Field transform: bound numeric field with specified value.

See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.maximum

Parameters

value (int | float) – value used to bound the field.

class google.cloud.firestore_v1.transforms.Minimum(value)[source]

Bases: google.cloud.firestore_v1.transforms._NumericValue

Field transform: bound numeric field with specified value.

See: https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.minimum

Parameters

value (int | float) – value used to bound the field.

class google.cloud.firestore_v1.transforms.Sentinel(description)[source]

Bases: object

Sentinel objects used to signal special handling.