Kid is a simple
template engine for
XML-based vocabularies written in
Python. Kid claims to have many of the best features of
XSLT
XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseque ...
,
TAL, and
PHP, but "with much of the limitations and complexity stamped out".
Kid initially acted as the
View
A view is a sight or prospect or the ability to see or be seen from a particular place.
View, views or Views may also refer to:
Common meanings
* View (Buddhism), a charged interpretation of experience which intensely shapes and affects thou ...
component of the
TurboGears framework in the framework's version 1.x implementation; however, the TurboGears project team has since replaced it with
Genshi, citing perceived performance advantages.
Kid is used by the
Fedora Project in the repoview utility
Repoview at Fedora Hosted
/ref> which creates a set of static HTML pages within a YUM repository.
Example
Python part:
from kid import Template
template = Template(file='mytemplate.kid',
title='bar',
mylist= 1', '2', '3', '4', '5', '6')
print template.serialize()
Template part:
title goes here
References
External links
*
Scripting languages
Python (programming language) libraries
Template engines
Articles with example Python (programming language) code
{{programming-software-stub