topic#

swordfish.streaming.topic(table_name: str, action_name: str) Topic#
swordfish.streaming.topic(*, topic: str) Topic

Retrieves a Topic by its associated StreamTable name and action name, or by its name.

Parameters:
  • table_name (str, optional) – The name of the StreamTable.

  • action_name (str, optional) – The name of the action associated with the StreamTable.

  • topic (str, optional) – The name of the Topic.

Returns:

The Topic corresponding to the provided StreamTable and action names, or topic name.

Return type:

Topic

Examples

Retrieve by table and action name:
>>> import swordfish as sf
>>> sf.streaming.topic('table_name', 'action_name')
Retrieve by topic name:
>>> import swordfish as sf
>>> sf.streaming.topic(topic='topic_name')