NOTE:
This project (right now) is unmaintained. It is pretty much a demo of what could happen with something like this. A version two is in the works, but not really.
pycommunicate
pycommunicate is a library that wraps flask and flask-socketio to provide you with a really cool thing.
what can it do?
pycommunicate allows for serverside event handling of js events, and even modifying the dom on the server. This is accomplished by using socketio, so anything that socketio supports, this should support too.
There's also jinja2 for template rendering, sessions that persist across... sessions, sessions that persist across requests, support for changing html from one page to another without swapping the page, and much more!
examples plz
Look in the docs/examples directory. The tutorial one can be created by following the tutorial on the docs