texttemplate
What is texttemplate?
texttemplate converts text templates into a simple object model that can be manipulated by ordinary Python scripts. It is fast, powerful and easy to use.
Some advantages:
- Total separation of markup and code
- Text templates can be edited using your favourite text editor. Control code can be written and maintained with your favourite Python editor. Special tag attributes indicate which text elements should be converted into nodes within the object model. Absolutely no code is kept in the template text, not even presentation logic.
- Simple, practical API
- texttemplate'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.
Full documentation, tutorials and example scripts are included in the texttemplate package.
Installation
Download the latest .tar.gz source release from the Python Package Index and follow the instructions in its README file.
Examples