It should be able to create, modify and read X/HTML in a highly object oriented way that still feels DOM like but is not obese, and is really Pythonic. Preferably it would deal with malformed HTML too, but we can skip this for templates.
For example, I'd like to do this:
>> from someAmazingTemplate import *
>> html = Template('<html><head><title>Hi</title></head><body></body></html>')
>> html.head.append('<link type="text/css" href="main.css" rel="stylesheet" />')
>> html.head.title
Hi
>> html['head']['title']
Hi
I should be able to use/define short functions and use them like this:
>> html.head.append(stylesheet(href="main.css"))
>> html.body.append(h1('BIG TITLE!12',Class="roflol"))
>> html.body.SOURCE
<body>
<h1 class="roflol">
BIG TITLE!12
</h1>
</body>
Note: If it doesn't exist, I'm going to make it under BSD/MIT/Python license. Help is most welcome. Anything that works towards more Pythonic web app development will be great. Very much appreciate it!
-Luke Stanley