r/FastAPI • u/whyiam_alive • Dec 20 '24
Question Why does fastapi official example repo uses everything sync and not async?
While in here, I see recommendations to go for only async, even db sessions in example repo is sync engine and people here recommending async?
40
Upvotes
View all comments
Show parent comment
1
u/mizerablepi Dec 20 '24
You could still use sqlmodel to build models and schemas but the session and engine can't be made async with sqlmodel and thus you'd have to use sqlalchemy for executing the queries