r/FastAPI • u/Busy_Dig338 • Sep 28 '25
feedback request FastAPI setup with no ORM
I have this simple setup to connect to postgres without any ORM. I'd love some suggestion how to improve this
7
Upvotes
View all comments
Show parent comment
2
u/Busy_Dig338 Sep 29 '25
Thanks for the feedback. However, I don't get why you said the connection is cached. If I understand correctly everytime I query something, I take out a connection from the pool which asyncpg manages. After the query is done, the connection is returned back to the pool. That means if multiple requests coming in at the same time, each will take a different connection out of the pool.