跳到主要内容

Attribute

查看 Markdown

This page lists the Python SDK names for Attributes. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Python SDK API reference.

API names​

TaskPython APIDex behavior
Define a singleton AttributeAttributeAttributes
Define an AttributeMapAttributeMapAttributes
Declare it in the FlowPersistenceSchema.of, returned from get_persistence_schemaFlow definition
Read, write, and delete a value in a Step or RPCget, set, and deleteCommits
Address one AttributeMap instanceAttributeMap.instance, or the instance key argument of get, set, and deleteAttributes
Count AttributeMap instances and list their keysAttributeMap.get_map_size and AttributeMap.get_all_instance_keysSelective state loading
Load AttributeMap values for a methodAttributeMap.load, with the load fields of StepOptions or @rpcSelective state loading
Lock a value for a read-modify-writelock, with the lock fields of StepOptions or lock_attributes of @rpcLocks
Index a value for searchAttributeIndex and IndexTypeIndexes
Project writes to an Attribute Storesync_to_attribute_storeAttribute sync
Store a value that can be erasedhard_delete_on_nullHard-delete Attributes
Set a value when the Flow startsStartFlowOptions.with_attributeAttributes at start
Read values from outside the FlowClient.get_attributesRead Attributes
Wait until a value matchesClient.wait_for_attribute_matchWait for an Attribute match

Example​

Example: examples/python/dex_examples/primitives/attribute/attribute_flow.py