class documentation
class TypedSearchAttributes(Collection[
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.
| Method | __contains__ |
Check whether this search attribute contains the given key. |
| Method | __getitem__ |
Get a single search attribute value by key or fail with KeyError. |
| Method | __iter__ |
Get an iterator over search attribute key/value pairs. |
| Method | __len__ |
Get the number of search attributes. |
| Method | __post |
Post-init initialization. |
| Method | get |
Get an attribute value for a key (or default). This is similar to dict.get. |
| Method | updated |
Copy this collection, replacing attributes with matching key names or adding if key name not present. |
| Class Variable | empty |
Class variable representing an empty set of attributes. |
| Class Variable | search |
Underlying sequence of search attribute pairs. Do not mutate this, only create new TypedSearchAttribute instances. |
Check whether this search attribute contains the given key.
This uses key equality so the key must be the same name and type.
def __getitem__(self, key:
SearchAttributeKey[ SearchAttributeValueType]) -> SearchAttributeValueType:
(source)
¶
Get a single search attribute value by key or fail with KeyError.
@overload
def get(self, key:
@overloadSearchAttributeKey[ SearchAttributeValueType]) -> SearchAttributeValueType | None:def get(self, key:
(source)
¶
SearchAttributeKey[ SearchAttributeValueType], default: temporalio.types.AnyType) -> SearchAttributeValueType | temporalio.types.AnyType:Get an attribute value for a key (or default). This is similar to dict.get.
Copy this collection, replacing attributes with matching key names or adding if key name not present.