This is really cool. I was playing around with a similar concept myself a few years ago (trying to build something React-esque, but for Python GUIs). It was way over my head then though, so I've never got anything more than a proof of concept working.
Check out the cool / weird DSL though!
https://github.com/notpushkin/pyrract