Skip to main content

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>

Metadata

Release files for kajiki 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kajiki 1.0.3
File Size Uploaded Provenance Actions
kajiki-1.0.3.tar.gz 48.0 kB Without provenance Details for kajiki-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kajiki 1.0.3
File Interpreter ABI Platform Actions
kajiki-1.0.3-py3-none-any.whl Python 3 none any Details for kajiki-1.0.3-py3-none-any.whl

Total release size: 84.4 kB

Release files / kajiki-1.0.3.tar.gz

Download URL kajiki-1.0.3.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
31468f6808557b38a129df54edfc092e06bef8ea2c91827fd1d496b3f00bd6af
BLAKE2b-256 checksum
How to use checksums
c541f2a147dd238cc5b64409c6b9f143102bb51f25ba97acc107f6bd99187bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / kajiki-1.0.3-py3-none-any.whl

Download URL kajiki-1.0.3-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a5a9ed9d46fe3f1fdfdadf23af88601ff20152fd9d2f68efd9892c21bde68e7
BLAKE2b-256 checksum
How to use checksums
82fc9e945ae08a021730744670af690d9c1f566601f4330708732b5fe03330db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for kajiki 1.0.3

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.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page