SQLAlchemy and Twisted [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this questionI'v learned twisted for somewhile and would like to do some network communication and local db operation as well.BTW, MySQL DB adopted, non-blocking required and perferred.
Someone told me that sqlalchemy is just great. But as far as I have known from the Internet, the two may not work together perfectly(http://twistedmatrix.com/pipermail/twisted-python/2009-March/019359.html ).
开发者_Python百科So I would like to know if anyone has this kind of experience(either successful or a failure is welcomed) to make both of them work together?
And Could anyone tell why there is no way for them to work together?
Thank you in advance!
SQLAlchemy presents a blocking interface to database access. You can use it with Twisted if you use it in a separate thread. It's frequent to use many threads with SQLAlchemy anyway, so there's nothing really special going when you try to use it with Twisted. It only seems strange because Twisted itself mostly offers APIs which you don't need threads for.
Been searching for a while and found alchimia that lets you use most of the SQLAlchemy-core API with Twisted, it does not allow you to use the ORM.
精彩评论