How do you *properly* query Redis from Tornado?

后端 未结 3 1863
野的像风
野的像风 2021-01-31 05:05

I\'m curious what the recommended method of querying Redis (or any DB for that matter) is from Tornado.

I\'ve seen some examples like https://gist.github.com/357306 but

3条回答
  •  不知归路
    2021-01-31 05:50

    One option is to use the port of Tornado to Twisted and then use the Twisted Redis API with that. Tornado itself doesn't seem to have arbitrary asynchronous operations as an objective (though if you wanted to rebuild all of the sorts of things that have been built for Twisted, you probably could build them from the low-level iostream APIs in Tornado, but I wouldn't recommend it).

提交回复
热议问题