chameleon.zpt 1.0b11
pip install chameleon.zpt==1.0b11
Newer version available (1.1.3)
Released:
Zope Page Template engine based on Chameleon
Navigation
Unverified details
These details have not been verified by PyPIMeta
- License: BSD
- Author: Malthe Borch and the Zope Community
Classifiers
Project description
Overview
========
This package provides a fast Zope Page Template implementation based
on the Chameleon template compiler. It's largely compatible with
``zope.pagetemplate``.
Usage
-----
Load the package component configuration file (configure.zcml).
Performance
-----------
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
specification.
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.
dictionary.key
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'}!
</span>
.. _TAL: http://wiki.zope.org/ZPT/TALSpecification14
Development
-----------
If you want to use the code directly from trunk (recommended only for
development and testing usage), provide ``chameleon.zpt==dev`` as your
dependency.
The code is maintained in a subversion repository::
svn://svn.repoze.org/svn/chameleon.zpt
Want to contribute? Join #zope3-dev on Freenode IRC.
========
This package provides a fast Zope Page Template implementation based
on the Chameleon template compiler. It's largely compatible with
``zope.pagetemplate``.
Usage
-----
Load the package component configuration file (configure.zcml).
Performance
-----------
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
specification.
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.
dictionary.key
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-
</span>
.. _TAL: http://wiki.zope.org/ZPT/TALSpecification14
Development
-----------
If you want to use the code directly from trunk (recommended only for
development and testing usage), provide ``chameleon.zpt==dev`` as your
dependency.
The code is maintained in a subversion repository::
svn://svn.repoze.org/svn/chameleon.zpt
Want to contribute? Join #zope3-dev on Freenode IRC.
Project details
Unverified details
These details have not been verified by PyPIMeta
- License: BSD
- Author: Malthe Borch and the Zope Community
Classifiers
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file chameleon.zpt-1.0b11.tar.gz
.
File metadata
- Download URL: chameleon.zpt-1.0b11.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc55724980e74aec58715f4e87d095a6ab475ce5806e43db9ae2d99208bc0465 |
|
MD5 | 429f8ef9dbbc124c894a77bfc0396ca0 |
|
BLAKE2b-256 | ff9cf8899084d84bd8382af36830b76915f2d6e6aae5e4e57c2d365fa140e33c |