Build a tiny template renderer, like a much smaller Jinja.
Implement render(template, context) supporting:
{{ name }}: insert a value. Dotted paths like {{ user.name }} look up dict keys. Missing values raise KeyError. Whitespace inside the braces is optional.{{ name | upper }}, | lower, | title and | default:text (used when the value is missing or None). Filters can be chained left to right.html.escape) unless the last filter is | safe.{% for item in items %}...{% endfor %}: repeat the block once per item, with item added to the context. Loops can be nested.