This is a Python port of a very clever Node.js module. Please see hij1nx/weld for more documentation. Have a look at test.py and test.html at the same time, you'll see how to use it.