开发者

SQLAlchemy and Twisted [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

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 question

I'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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜