sgr_commhandler.utils.template

Provides a function to substitute placeholders in a template.

Functions

substitute(template, substitutions)

Substitutes placeholders in a template string.

Module Contents

sgr_commhandler.utils.template.substitute(template, substitutions)

Substitutes placeholders in a template string.

Parameters:
  • template (str) – the template string

  • substitutions (dict[str, str]) – the placeholders with their value

Returns:

the template after replacements

Return type:

str