class Example(tornado.web.RequestHandler):

    def get(self):
        connection = some_connection_pool.get_connection()
with transaction.manager:
    root = conn.root()
res = fn(root)
root._p_changed = 1
ZODB with Tornado