Kajiki provides fast well-formed XML templates
Because Kajiki’s input is XML, it can ensure that your HTML/XML output is well-formed. The Genshi-like syntax, based on XML attributes or tags, is simply beautiful and easily understood (or ignored) by web designers. But instead of the slow performance of Genshi, Kajiki compiles templates to Python code that renders with blazing-fast speed, so Kajiki can compete with the speed of Jinja, Mako, Chameleon and others. Also, one of Genshi’s misfeatures – py:match – is replaced with blocks which work like Jinja’s blocks.
By combining the best ideas out there – XML input, Genshi’s syntax and features, Jinja’s template inheritance and final compilation to Python –, Kajiki is ready to become the most widely used templating engine for web development in Python. And more features are coming soon; stay tuned!
Example
>>> 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>
Links
Kajiki is licensed under an MIT-style license.
The git repository and issue tracker are at GitHub. Previously the project used SourceForge for the hg repository, issue tracker and forums.
Metadata
Release files for kajiki 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kajiki-1.0.2.tar.gz | 48.0 kB | Without provenance | Details for kajiki-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kajiki-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for kajiki-1.0.2-py3-none-any.whl |
Total release size: 84.6 kB
Release files / kajiki-1.0.2.tar.gz
| Download URL | kajiki-1.0.2.tar.gz |
|---|---|
| Size | 48.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe42d26abc4331982bde426d9f6f4848969868682a19c5882781d5a3e975cc69
|
|
BLAKE2b-256 checksum How to use checksums |
72216c7e02f5676140aee8b63aed2b59095e41256bad2eebc3e89f8189b00697
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / kajiki-1.0.2-py3-none-any.whl
| Download URL | kajiki-1.0.2-py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
264beced8fb0d41601fc47e4656bd4fd95b92bbc49b646a753c5a02b8bc2f11c
|
|
BLAKE2b-256 checksum How to use checksums |
8a06ffe08966c5dc27c499b86a106c223267fa32b3219438956908c6efba5904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Security for kajiki 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.