Async not used #2120
-
|
The template does not use async at all. Is there any particular reason for that? Do celery, sqlalchemy etc work with async? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
|
I was trying to find out that info. So no asyncpg? |
Beta Was this translation helpful? Give feedback.
-
|
I couldn't find a way to use sqlalchemy with async-await for my previous project so I decided to use the Databases package |
Beta Was this translation helpful? Give feedback.
-
|
For database async application, tortoise-orm is fine too. |
Beta Was this translation helpful? Give feedback.
-
|
sqlalchemy 1.4 enables async use of the ORM |
Beta Was this translation helpful? Give feedback.
-
|
I had similar/related doubts (why the examples were using blocking operations) and I was missing some background information that I found reading this comment and the technical details in the fastapi documentation But particularly for your question you should find your answer here: |
Beta Was this translation helpful? Give feedback.
-
|
The simplest is to start without async, and add async to the code paths that need it, but that requires careful handling to make sure the libraries used internally are compatible with async, or are properly wrapped with, for example, Asyncer. |
Beta Was this translation helpful? Give feedback.
The simplest is to start without async, and add async to the code paths that need it, but that requires careful handling to make sure the libraries used internally are compatible with async, or are properly wrapped with, for example, Asyncer.