[ANN] pyTenjin 0.6.2 - a fast and full-featured template engine

makoto kuwata kwa at kuwata-lab.com
Wed Feb 27 16:20:52 CET 2008

I have released pyTenjin 0.6.2.
This is a tiny bug fix release.

pyTenjin is the fastest template engine for Python.
Not only very fast, but also full-featured and easy-to-use is
You can embed Python statements and expressions into your text file.
Tenjin converts it into Python program and evaluate it.

* very fast
  - x2 faster than Mako
  - x3 faster than Cheetah and Myghty
  - x9 faster than Django
  - x60 faster than Kid
* Full-featured
  - layout template
  - partial template
  - capturing
  - preprocessing
  - and so on...

You can see the detail of benchmark at:
(benchmark script is included in pyTenjin distribution.)


   $ easy_install Tenjin
   ## or download, extract, and execute 'setup.py'

Example: template.pyhtml

   <?py for item in items: ?>
   <?py #end ?>

Example: main.py

   import tenjin
   from tenjin.helpers import to_str, escape
   engine = tenjin.Engine()
   context = { 'title': 'pyTenjin Example',
               'items': ['<AAA>', 'B&B', '"CCC"'] }
   output = engine.render('template.pyhtml', context)
   print output,

Example: result

   $ python main.py
   <h1>pyTenjin Example</h1>

See user's guide and examples at the above page for details.
New release of pyTenjin will be informed at:

Release 0.6.2:


  * When '-S', '-a retrieve', '-X', or '-a statements' specified,
    pytenjin command replaces text before expressions into spaces
    and print it.


  * pytenjin command printed "\n\n" instead of "\n" when '-U'
    Fixed to print "\n".

makoto kuwata

More information about the Python-list mailing list