HTMLTemplate converts (X)HTML templates into simple object models controlled by callback functions defined in your Python code. Conceptually similar to DOM (but much simpler), it provides complete separation between HTML markup and presentation logic. It boasts an excellent power-to-weight ratio thanks to its lightweight DOM-inspired design: the implementation and API are extremely simple and compact, yet powerful, flexible, and easy to modify and/or use.
| Tags | Text Processing Markup HTML/XHTML Internet Web Dynamic Content |
|---|---|
| Licenses | LGPL |
| Implementation | Python |
Recent releases


Release Notes: This release makes minor API improvements and converts all documentation and tutorials to HTML format.


Release Notes: This release fixes a minor typo in the HTMLTemplate manual, and adds the MIT license text to the HTMLTemplate.py file.


Release Notes: This release switches HTMLTemplate from the LGPL to the MIT License.


Release Notes: Fixes a bug in 1.4.0's attribute value escaping.


Release Notes: Tag attributes' values are now escaped as HTML entities. An optional "warnings" parameter was added to the Template constructor. HTMLParser is now prevented from decoding some HTML entities in attribute values when parsing template markup.