render_template_string
Render a template from the given source string with the given context.
def render_template_string(
source: str,
context: t.Any
) - > str
Render a template from the given source string with the given context.
Parameters
| Name | Type | Description |
|---|---|---|
| source | str | The source code of the template to render. |
| context | t.Any | The variables to make available in the template. |
Returns
| Type | Description |
|---|---|
str | The rendered template as a string. |