Long ago, before jsx and react, before hack, Facebook had a fork of php called xhp, which allowed xml data within php. I'm not suggesting anybody should maintain a fork of python with xml support but a pre-processor could parse xython and generate standard python with trees of html.xx() calls.

https://en.wikipedia.org/wiki/XHP

xhp was honestly pretty nice - it was something watching the rapid codemods transform the language.

There was also ComponentKit, which was used heavily in fbobjc: https://github.com/facebook/componentkit