-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
33 lines (30 loc) · 1.19 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Kajiki: Really fast well-formed xml templates
Are you tired of the slow performance of Genshi? But
you still long for the assurance that your output is well-formed that you
miss from all those other templating engines? Do you wish you had Jinja's
blocks with Genshi's syntax? Then look no further, Kajiki is for you!
Kajiki quickly compiles Genshi-like syntax to *real python bytecode*
that renders with blazing-fast speed! Don't delay! Pick up your
copy of Kajiki today!
## QuickStart
:::python
>>> import kajiki
>>> Template = kajiki.XMLTemplate('''<html>
... <head><title>$title</title></head>
... <body>
... <h1>$title</h1>
... <ul>
... <li py:for="x in range(repetitions)">$title</li>
... </ul>
... </body>
... </html>''')
>>> print Template(dict(title='Kajiki is teh awesome!', repetitions=3)).render()
<html>
<head><title>Kajiki is teh awesome!</title></head>
<body>
<h1>Kajiki is teh awesome!</h1>
<ul>
<li>Kajiki is teh awesome!</li><li>Kajiki is teh awesome!</li><li>Kajiki is teh awesome!</li>
</ul>
</body>
</html>