flask.render_template_string

flask.render_template_string(source, **context)[source]

Renders a template from the given template source string with the given context. Template variables will be autoescaped.

Parameters:
  • source – the source code of the template to be rendered
  • context – the variables that should be available in the context of the template.