Skip to main content

Zope Page Template engine based on Chameleon

Project description


This package provides a fast Zope Page Template implementation based
on the Chameleon template compiler. It's largely compatible with


Load the package component configuration file (configure.zcml).


Casual benchmarks pegs it 16x more performant than the reference
implementations for Zope TAL and Genshi (using Python-expressions).

Compiler notes

The compiler is largely compatible with the reference
implementation. The TAL implementation is based on the 1.4 language

Some notable changes:

1. Tuple unpacking is allowed when defining variables:

tal:define="(a, b, c) [1, 2, 3]"

2. Generators are allowed in tal:repeat statements. Note that the
repeat variable is not available in this case.

tal:repeat="i <some generator>"

3. Attribute-access to dictionary entries is allowed in
Python-expressions, e.g.


can be used instead of ``dictionary['key']``.

4. The default expression type is Python.

5. Genshi expression interpolation syntax is supported outside tags
and inside static attributes, e.g.

<span class="hello-${'world'}">
Hello, ${'world'}!

.. _TAL:


If you want to use the code directly from trunk (recommended only for
development and testing usage), provide ``chameleon.zpt==dev`` as your


Want to contribute? Join #zope3-dev on Freenode IRC.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for chameleon.zpt, version 1.0b6
Filename, size File type Python version Upload date Hashes
Filename, size chameleon.zpt-1.0b6.tar.gz (33.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page