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.

pypm install tomako

How to install tomako

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install tomako
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1.0 Available View build log
Lastest release
version 0.1.0 on May 5th, 2013

Tomako is a tiny library designed to provide an easy way to use Mako as a template engine for Tornado.

This lib was tested with Tornado 2.3/2.4 and Mako 0.7.2, but should work in other versions - although it wasn't tested in other versions.


The recommended approach is to pass template_loader configuration to Application class.

System Message: ERROR/3 (<string>, line 16)

Unknown directive type "code-block".

.. code-block:: python

    from tomako import MakoTemplateLoader

    conf = {
        'template_loader': MakoTemplateLoader('/full/template/path')
    app = Application(urls, **conf)

If you can't for any reason modify the template_loader configuration or you want to use Mako as a template engine only on some handlers, you can overwrite RequestHandler.create_template_loader.

System Message: ERROR/3 (<string>, line 29)

Unknown directive type "code-block".

.. code-block:: python

    from tornado.web import RequestHandler
    from tomako import MakoTemplateLoader

    class MyHandler(RequestHandler):
        def create_template_loader(self, template_path):
            return MakoTemplateLoader(template_path)


System Message: ERROR/3 (<string>, line 41)

Unknown directive type "code-block".

.. code-block:: shell

    pip install tomako


This work is licensed under MIT license (see LICENSE file).

Subscribe to package updates

Last updated May 5th, 2013

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.