temporalio.common.TypedSearchAttributes
class documentation

Collection of typed search attributes.

This is represented as an immutable collection of SearchAttributePair. This can be created passing a sequence of pairs to the constructor.

def __contains__(self, key: object) -> bool: (source)

Check whether this search attribute contains the given key.

This uses key equality so the key must be the same name and type.

Get a single search attribute value by key or fail with KeyError.

Get an iterator over search attribute key/value pairs.

def __len__(self) -> int: (source)

Get the number of search attributes.

def __post_init__(self): (source)

Post-init initialization.

def get(self, key: SearchAttributeKey[SearchAttributeValueType], default: temporalio.types.AnyType) -> SearchAttributeValueType | temporalio.types.AnyType:
(source)

Get an attribute value for a key (or default). This is similar to dict.get.

def updated(self, *search_attributes: SearchAttributePair) -> TypedSearchAttributes: (source)

Copy this collection, replacing attributes with matching key names or adding if key name not present.

Class variable representing an empty set of attributes.

Underlying sequence of search attribute pairs. Do not mutate this, only create new TypedSearchAttribute instances.

These are sorted by key name during construction. Duplicates cannot exist.