fastapi.render()

Renders a template (path relative to the template folder) to a str.

Usage

Source

fastapi.render(
    template_file,
    **template_data,
)

Raises FastAPIChameleonException if nothing is configured.