*** Welcome to piglix ***

Genshi (templating language)

Genshi
Developer(s) Edgewall Software
Initial release August 3, 2006; 11 years ago (2006-08-03)
Stable release
0.7 / January 27, 2013; 4 years ago (2013-01-27)
Operating system Cross-platform
Type Template Engine
Website genshi.edgewall.org

Genshi is a template engine for XML-based vocabularies written in Python. Genshi is used to easily insert generated output into XML-based languages, usually HTML, and reuse elements between documents. Genshi's syntax is based on Kid, but its architecture is different. Genshi aims to implement some of its functionality while processing templates faster, by dynamically processing templates using a stream based API, instead of compiling templates to Python code.

Genshi can be used with several Python web frameworks, such as CherryPy,TurboGears,Pylons and web2py. Genshi has replaced Kid in the TurboGears 2.x web framework.

Genshi makes use of namespaces to embed instructions into HTML. A typical instruction is given as an attribute, with a Python expression inside the quotes. For example, the following will render a paragraph that shows 4:

Because of the use of namespaces, Genshi can be used in WYSIWYG HTML editors.


...
Wikipedia

...