ContextStr

ContextStr(template: str)

A string that requires context variable substitution.
Use the format method to substitute context variables into the string.

Parameters:
NameDescription
templateType: str

Class Attributes

template



Instance Methods

format

format(self, context_variables: dict[str, Any]) -> str

Substitute context variables into the string.

Parameters:
NameDescription
context_variablesThe context variables to substitute into the string.

Type: dict[str, typing.Any]