I happened to stumble across HAML, an interesting and beautiful way to mark up contents and write templates for HTML.
Since I use Python and Django for my web develo
i'm looking for the same. I haven't tried it, but found this:
http://github.com/jessemiller/HamlPy
I would use this one, it seems to be the most standard one: https://pypi.org/project/HamlPy3/0.83.0/
Assuming you're using Python3, you shouldn't haver any issues using it with Django, Flask or even standalone.
You might be interested in SHPAML:
http://shpaml.com/
I am actively maintaining it. It is a simple preprocessor, so it is not tied to any other tools like Genshi. I happen to use it with Django, so there is a little bit of Django support, but it should not interfere with most other use cases.
I'd check out GHRML, Haml for Genshi. The author admits that it's basically Haml for Python and that most of the syntax is the same (and that it works in Django). Here's some GHRML just to show you how close they are:
%html
%head
%title Hello World
%style{'type': 'text/css'}
body { font-family: sans-serif; }
%script{'type': 'text/javascript', 'src': 'foo.js'}
%body
#header
%h1 Hello World
%ul.navigation
%li[for item in navigation]
%a{'href': item.href} $item.caption
#contents
Hello World!
I ran across jade doing some node.js work and when returning to Django was looking for something similar. I found Pyjade and while it's nearly exactly what I'm looking for it handles errors and debugging rather poorly within Django.