What is HTMLTemplate?
HTMLTemplate converts HTML/XHTML templates into simple Python object models that can be manipulated through callback functions in your scripts. It is fast, powerful and easy to use.
Some advantages:
- Total separation of markup and code
- HTML templates can be edited using your favourite HTML editor and previewed in web browsers. Control code can be written and maintained with your favourite Python editor. Special tag attributes indicate which HTML elements should be converted into nodes within the object model. Absolutely no code is kept in the HTML markup, not even presentation logic.
- Simple, practical API
- HTMLTemplate's powerful, highly-refined interface is designed for simplicity and ease of use, yet without compromising power and flexibility. Its API is defined as just four public classes containing less than a dozen properties and methods.
- Allows component-based construction
- Rendered pages can be constructed from a single large template or composed from several smaller ones. Generated content can be reused whole or in-part.
- Doesn't get in your face
- Lightweight design, strictly KISS. No boilerplate code required. Strong emphasis on ease of use.
- Free
- Released under MIT Licence, allowing use in both open and closed-source projects.
HTMLTemplate requires Python 2.3 or later.