[Twisted-Python] questions about twisted usage

Tobias Oberstein tobias.oberstein at tavendo.de
Thu Mar 22 04:58:42 MDT 2012


> 5. Related to all of the above.  What If I want to modify a database inside a
> deferred?  Is that incorrect usage?  Specifically, if all my requests run as

For database access, in general, you would follow

http://twistedmatrix.com/documents/current/core/howto/rdbms.html

This is a Twisted wrapper around the standard Python DBI API and
the canonical/recommended way of doing database stuff.

This applies to anything from SQLite to PostgreSQL and Oracle.

For PostgreSQL, I would also have a look at

https://github.com/oberstet/txpostgres

which is a drop-in replacement for

twisted.enterprise.adbapi

that makes use of the PostgreSQL protocol's native asynch features.


More information about the Twisted-Python mailing list