The lazy compilation of regular expressions is important when running as CGI; you don't want to have each template compiled until you know all the previous template rules failed to match.
For now the code sits in the 1812 project. I haven't decided if it's enough code to warrant being in a standalone project or if it can just live as a part of 1812.
I've mentioned previously that I'm not thrilled with Python documentation options, so for this module I'm experimenting with docutils. All of the documentation is in the module doc strings as reStructured Text, which I then extract and convert into HTML using the docutils library.