Can SQLAlchemy be configured to be non-blocking?

后端 未结 3 1212
南笙
南笙 2020-12-08 00:29

I\'m under the impression that database calls through SQLAlchemy will block and aren\'t suitable for use in anything other than synchronous code. Am I correct (I hope I\'m n

3条回答
  •  太阳男子
    2020-12-08 01:18

    Without the help of greenlet, the answer is no, in the context of asyncio.

    However it is possible to use only a part of SQLAlchemy in asyncio. Please find example in the GINO project, where we used only SQLAlchemy core without engine and full execution context to make a simple ORM in asyncio.

提交回复
热议问题