Tornado's proprietary database module supports transactions just fine.
class Application(tornado.web.Application): def __init__(self): handlers = [ (r'/', someHandler), ] tornado.web.Application.__init__(self, handlers) self.db = tornado.database.Connection( host=mysql_host, database=mysql_db, user=mysql_user, password=mysql_password)
However, it does not support asynchronous calls.
UPDATE (May 2015)
Several updates to the topic.
- The Tonado DB driver has been excluded from the project. It is available as a separate library named torndb (available here ).
- These projects may be of interest: TorMySQL , Tornado-MySQL , AsyncTorndb .
source share