TDI (/ʹtedɪ/ [1]) is a markup templating system written in python with (optional but recommended) speedup code written in C.
Unlike most templating systems TDI does not invent its own language to provide functionality [2]. Instead you simply mark the nodes you want to manipulate within the template document. The template is parsed and the marked nodes are presented to your python code, where they can be modified in any way you want.
TDI is currently available for python2 versions only (starting with python 2.4). Python 3 is not supported yet. The following alternative implementations are supported:
Kess held an introductory talk about TDI at PyCon DE 2011, which is available on youtube (German, about 30 minutes).
TDI has proven its performance and stability in high load production environments, which means, it works and it’s stable. There are still some kinks to solve and a few missing minor features to add until TDI reaches version 1.0. So, development wise it’s effectively a beta release right now.
Here is the short variant why you should consider reading on:
TDI is pure, simple, fast and powerful.
And here’s a bit more (for the long variant have a look at the documentation):
Pure
Simple
Fast
Powerful
TDI is available under the terms and conditions of the “Apache License, Version 2.0.” You’ll find the detailed licensing terms in the root directory of the source distribution package or online at http://www.apache.org/licenses/LICENSE-2.0.
TDI was written and is maintained by André Malo.
First of all I’d like to thank the author of HTMLTemplate. At the time I started experimenting with document tree based template systems, HTMLTemplate was short-listed. However, it had a different license back then, which was unacceptable for my purposes and also missing some features, so TDI was grown in the first place.
Various people helped developing and improving TDI itself. They are listed in alphabetical order:
[1] | The pronunciation came up while discussing TDI at the breakfast table. Once our little daughter picked it up and asked for her “teddy...?”. [3] |
[2] | It does invent some markup, though. Especially for plain text templates, because they naturally do not provide their own markup system. |
[3] | Well, the joke is easier to understand, if you’re speaking German at your breakfast table. |