[Twisted-Python] Twisted + SQLAlchemy

5 May
2006
5 May
'06
10:14 a.m.
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:
http://foss.eepatents.com/pNetworkX/browser/trunk/pnetworkx/database.py
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":
http://foss.eepatents.com/pNetworkX/browser/trunk/pnetworkx/edges.py
Best regards, Ed Suominen
6170
Age (days ago)
6170
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ed Suominen