| Name | Type | Description |
|---|---|---|
template | str | list[tuple[str, str]] | Default: ''A file-like object or a string containing the template. |
data | Mapping[str, Any] | Default: EMPTY_DICT |
partials_dict | Mapping[str, str] | Default: EMPTY_DICT |
padding | str | Default: '' |
def_ldel | str | Default: '{{' |
def_rdel | str | Default: '}}' |
scopes | Scopes | None | Default: None |
warn | bool | Default: False |
keep | bool | Default: False |
Render a mustache template.
Renders a mustache template with a data scope and inline partial capability.
A python dictionary with your data scope.
A python dictionary which will be search for partials before the filesystem is.
{'include': 'foo'} is the same as a file called include.mustache
(defaults to {}).
This is for padding partials, and shouldn't be used (but can be if you really want to).
The default left delimiter
('{{' by default, as in spec compliant mustache).
The default right delimiter
('}}' by default, as in spec compliant mustache).
The list of scopes that get_key will look through.
Log a warning when a template substitution isn't found in the data
Keep unreplaced tags when a substitution isn't found in the data.