Cheetah3 is a free and open source template engine and code-
generation tool written in Python. Cheetah can be used unto itself,
or incorporated with other technologies and stacks regardless of
whether they’re written in Python or not.

At its core, Cheetah is a domain-specific language for markup 
generation and templating which allows for full integration with 
existing Python code but also offers extensions to traditional 
Python syntax to allow for easier text-generation.