[Twisted-Python] Twisted synchronous and asynchronous db connections

Doug Farrell doug.farrell at gmail.com
Mon Nov 9 22:24:08 EST 2009


Hi all,

Our projects at work include synchronous applications (short lived)
and asynchronous Twisted applications (long lived). We're re-factoring
our database and are going to build an API module to decouple all of
the SQL in that module. I'd like to create that API so both
synchronous and asynchronous applications can use it. For the
synchronous applications I'd like calls to the database API to just
return data (blocking) just like using MySQLdb, but for the
asynchronous applications I'd like calls to the same API
functions/methods to be non-blocking, probably returning a deferred.
Anyone have any hints, suggestions or help they might offer me to do
this?

Thanks in advance,
Doug



More information about the Twisted-Python mailing list