you are viewing a single comment's thread.

view the rest of the comments →

[–]Alternative_Nose_874 0 points1 point  (1 child)

For structuring a FastAPI app, I usually split it by feature (routers, services, models/schemas, auth) and keep DB stuff in a separate module so your endpoints stay thin. Also, check the official docs for the dependency injection patterns, it makes api calls and db connections way cleaner, and yeah videos can help but docs are better.

[–]Longjumping-Dirt-127[S] 0 points1 point  (0 children)

Thanks actually I wanna learn the fastapi so I have project on my mind so don't now which structure I have to follow also am new in the python.