Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install kajiki

How to install Kajiki

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install kajiki
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.5
0.4.3Never BuiltWhy not?
0.3.5 Available View build log
0.3.4 Available View build log
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3.0 Failed View build log
0.2.2 Available View build log
0.2.1 Available View build log
Windows (64-bit)
0.3.5
0.4.3Never BuiltWhy not?
0.3.5 Available View build log
0.3.4 Available View build log
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3.0 Failed View build log
0.2.2 Available View build log
0.2.1 Available View build log
Mac OS X (10.5+)
0.3.5
0.4.3Never BuiltWhy not?
0.3.5 Available View build log
0.3.4 Available View build log
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3.0 Failed View build log
0.2.2 Available View build log
0.2.1 Available View build log
Linux (32-bit)
0.3.5
0.4.3Never BuiltWhy not?
0.3.5 Available View build log
0.3.4 Available View build log
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3.0 Failed View build log
0.2.2 Available View build log
0.2.1 Available View build log
Linux (64-bit)
0.4.3 Available View build log
0.3.5 Available View build log
0.3.4 Available View build log
0.3.3 Available View build log
0.3.2 Available View build log
0.3.1 Available View build log
0.3.0 Failed View build log
0.2.2 Available View build log
0.2.1 Available View build log
0.4.3 Available View build log
 
License
MIT
Dependencies
Lastest release
version 0.4.3 on Sep 20th, 2013

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>

CHANGES

0.4.3 (2013-08-12)
  • Accept "$(" without erroring out. Easier to write jQuery stuff.
0.4.2 (2013-08-01)
  • There was a showstopper regression in FileLoader. Fixes #1
0.4.0 (2013-07-29)
  • Support Python versions 2.6, 2.7, 3.2, 3.3 in a single codebase using the nine library.
  • Support HTML entities as well as XML entities in input templates.
  • py:include fixed, can see global variables.
  • Genshi compatibility: support built-in functions: defined(), value_of() and Markup().
  • py:def: Do not crash if a function has no content.
  • py:strip='' is the same as py:strip='True'.
  • Correctness: escape HTML attribute values.
  • Correctness: Always close script tags, even in XML mode.
  • Add integration module for the Pyramid web framework.
  • Give the FileLoader a path, not just a base directory.
  • Documentation improvements, including the need to write CDATA sections.
  • Move from Sourceforge to Github.
  • Use Travis for continuous integration.
  • The whole codebase is formatted according to PEP8.
0.3.5 (2012-05-07)
  • Several bugfixes
  • Output HTML attributes in alphabetical order (for testability)
0.3.4 (2011-06-01)
  • Make Kajiki work on Python 2.4
0.3.2 (2010-11-26)
  • Fix Python 2.5 syntax error
0.3.1 (2010-11-24)
  • Add support for py:with
  • Remove unused babel import that was breaking pip/easy_install
  • Python 2.5 fixes
  • Correctly strip None attributes and expressions
  • Turn off autoescaping in text templates
0.3 (2010-10-10)
  • Adds i18n support
  • Fixes several bugs: [#7], [#9], [#10]

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.