[Twisted-Python] Twisted + SQLAlchemy
5 May 2006 5 May '06
I've received an inquiry about how I'm using SQLAlchemy under Twisted. I thought I'd provide the answer so that others can benefit from it as well:
Note particularly the "transact" function, which is used as a decorator. Thanks to Valentino Volonghi (aka Dialtone) for the fine idea of using a decorator to set up a nonblocking transaction (using deferToThread) for whatever functions are so designated.
Here's a usage example, with various database-accessing methods that are decorated with "@transact":
Best regards, Ed Suominen
Age (days ago)
Last active (days ago)