Skip to main content

Channel

View as Markdown

This page lists the Python SDK names for Channels. 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 ChannelChannelChannels
Define a ChannelMapChannelMapChannelMap
Declare it in the FlowPersistenceSchema.of, returned from get_persistence_schemaFlow definition
Publish a message from a Step or RPCpublishCommits
Wait for messagesfor_one, for_n, at_least, at_most, and for_rangeWait conditions
Read the messages a wait consumedresultsChannel results
Load pending messages for a methodChannelMap.load_messages, with the load fields of StepOptions or @rpcSelective state loading
Read loaded pending messagespending_messages and find_pending_messagePending messages
Delete a pending messagedeletePending messages
Read the number of pending messagessizeSelective state loading
Count ChannelMap instances and list their keysChannelMap.get_map_size and ChannelMap.get_all_instance_keysChannelMap
Complete the Flow only when Channels are emptyforce_complete_if_channels_emptyForceCompleteIfChannelsEmpty

Example​

Example: examples/python/dex_examples/primitives/channel/channel_flow.py