Metadata-Version: 1.0
Name: Tenjin
Version: 1.1.1
Summary: a fast and full-featured template engine based on embedded Python
Home-page: http://www.kuwata-lab.com/tenjin/
Author: makoto kuwata
Author-email: kwa@kuwata-lab.com
License: MIT License
Download-URL: http://downloads.sourceforge.net/tenjin/Tenjin-1.1.1.tar.gz
Description: About
        -----
        
        pyTenjin is a very fast and full-featured template engine.
        You can embed Python statements and expressions into your template file.
        pyTenjin converts it into Python script and evaluate it.
        
        !!ATTENTION!!
        
        pyTenjin is enough stable, but it is under beta release.
        It means that API or specification may change in the future.
        
        
        Features
        --------
        
        * Very fast
        
          - About x10 faster than Django, x4 than Cheetah, x2 than Mako
          - In addition loading tenjin.py is very lightweight (important for CGI)
        
        * Full featured
        
          - Nestable layout template
          - Partial template
          - Fragment cache
          - Capturing
          - Preprocessing
        
        * Easy to learn
        
          - You don't have to learn template-specific language
        
        * Supports Google App Engine
        
        
        See `User's Guide`_ and `Changes`_ for details.
        
        .. _`User's Guide`:  http://www.kuwata-lab.com/tenjin/pytenjin-users-guide.html
        .. _`Changes`:  http://www.kuwata-lab.com/tenjin/pytenjin-CHANGES.txt
        
        
        Install
        -------
        
        ::
        
            $ sudo easy_install Tenjin
        
        Or::
        
            $ tar xzf Tenjin-X.X.X.tar.gz
            $ cd Tenjin-X.X.X
            $ sudo python setup.py install
        
        Or just copy 'lib/tenjin.py' and 'bin/pytenjin' into proper directory.
        
        (Optional) Install `PyYAML <http://pyyaml.org>`_.
        
        
        Example
        -------
        
        example.pyhtml::
        
            <?py # -*- coding: utf-8 -*- ?>
            <?py #@ARGS items ?>
            <table>
            <?py cycle = new_cycle('odd', 'even') ?>
            <?py for item in items: ?>
              <tr class="#{cycle()}">
                <td>${item}</td>
              </tr>
            <?py #endfor ?>
            </table>
        
        example.py::
        
            import tenjin
            #tenjin.set_template_encoding('utf-8')  # optional (defualt 'utf-8')
            from tenjin.helpers import *
            from tenjin.html import *
            #import tenjin.gae; tenjin.gae.init()   # for Google App Engine
            engine = tenjin.Engine()
            context = { 'items': ['<AAA>', 'B&B', '"CCC"'] }
            html = engine.render('example.pyhtml', context)
            print(html)
        
        Output::
        
            $ python example.py
            <table>
              <tr class="odd">
                <td>&lt;AAA&gt;</td>
              </tr>
              <tr class="even">
                <td>B&amp;B</td>
              </tr>
              <tr class="odd">
                <td>&quot;CCC&quot;</td>
              </tr>
            </table>
        
        
        See `other examples`_ .
        
        .. _`other examples`: http://www.kuwata-lab.com/tenjin/pytenjin-examples.html
        
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.4
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
