paper_firehose.commands.topic_cmd

Topic management CLI subcommands.

Functions

add_topic(config_path, name, *[, from_topic])

Create a new topic config file.

list_topics(config_path)

Return available topics with names and descriptions.

show_topic(config_path, name)

Return a topic config as formatted YAML.

paper_firehose.commands.topic_cmd.add_topic(config_path, name, *, from_topic=None)[source]

Create a new topic config file.

Parameters:
  • config_path (str) – Path to the main config file.

  • name (str) – New topic name (used as filename and name: field).

  • from_topic (Optional[str]) – Clone an existing topic instead of using the default template.

Return type:

Path

Returns:

Path to the created file.

Raises:

ValueError – If the name is invalid or the topic already exists.

paper_firehose.commands.topic_cmd.list_topics(config_path)[source]

Return available topics with names and descriptions.

Return type:

List[Dict[str, str]]

Parameters:

config_path (str)

paper_firehose.commands.topic_cmd.show_topic(config_path, name)[source]

Return a topic config as formatted YAML.

Return type:

str

Parameters:
  • config_path (str)

  • name (str)