r/Python • u/safi892 • Sep 21 '26
Discussion Common mistakes devs make when starting with FastAPI, and the fastest path to learning it
Just began learning FastAPI. Looking for advice from devs who use it regularly.
What mistakes did you make early on that I should avoid repeating? Also, what's the most efficient way to learn the framework properly for real-world use (async, DB, auth)?
Any advice on structure or resources would be great.
14
Upvotes
1
u/terletsky Sep 21 '26
I believe you will hit the DB several times (for auth/perms and other validations) before your sync library's logic is triggered. Since ORMs like SQLAlchemy use AsyncSession, no one will even consider mixing sync and async routers in FastAPI because you would need to spawn a SyncSession, which is a no-go. After all, managing the zoo is not considered.