“A simple and dirty HTML/XML template library for Python 3.”
>>> from dirty.html import *
>>> page = xhtml(
... head(
... title("Dirty"),
... meta(name="Author", content="Hong, MinHee <minhee@dahlia.kr>")
... ),
... body(
... h1("Dirty"),
... p("Dirty is a simple DSEL template library that...")
... )
... )
>>> print(page)
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<title>Dirty</title>
<meta content="Hong, MinHee <minhee@dahlia.kr>" name="Author" />
</head>
<body>
<h1>Dirty</h1>
<p>Dirty is a simple DSEL template library that...</p>
</body>
</html>