ANN: webstring 0.5

L. C. Rees lcrees at
Thu Jan 4 22:43:52 CET 2007

webstring is a template engine for programmers whose favorite template
language is Python. webstring can be used to generate any text output
from a template with the additional advantages of advanced XML and HTML
templating using the lxml and cElementTree libraries. webstring
includes a TurboGears/Buffet template API compatible plugin and support
for using webstring as WSGI middleware.

This release of webstring replaces the standalone packages webstring,
lwebstring, TurboWebstring, and LturboWebstring.

 webstring was designed to meet the following general goals:

   1. To separate model and view logic from controller logic.
   2. To separate template logic from template data.
   3. To require only Python for templating.
   4. To use Python syntax, idiom, and patterns.
   5. To play well with other Python software.

webstring's XML and HTML templating was designed to meet the following

   1. To use XML as a data format, not a programming language.
   2. To use existing XML formats.
   3. To hide the parts of an XML document that are not being used.
   4. To use the best Python XML libraries.
   5. To bridge HTML and XML.

webstring can be downloaded from its Python CheeseShop page at:

or installed using setuptools' easy_install:

easy_install webstring

More information on webstring including documentation and an
introduction is available at:

An introduction to webstring's plaintext templating is available at:

Highlights of the 0.5 release include:

- templating support for non-XML text formats
- the ability to use lxml as the XML processing library for XML
- the inclusion of a TurboGears/Buffet compatible template plug-in
- XInclude support (using lxml as the XML processing library)
- can apply XSLT stylesheets to any part of an XML template using the
transform method (using lxml as the XML processing library)
- the replication operator (*) now repeats the current state of a
template instead of the default state
- the order in which XML elements are concatenated (+) with other XML
elements is now preserved
- decorators for WSGI templating middleware
- cElementTree and lxml-based XML templates pickle and unpickle properly

More information about the Python-announce-list mailing list