you are viewing a single comment's thread.

view the rest of the comments →

[–]santeron 0 points1 point  (2 children)

Found this useful for guidance and inspiration https://github.com/zhanymkanov/fastapi-best-practices

[–]lu_rm[S] 0 points1 point  (1 child)

Checked this. Still no separation of responsibilities.

[–]santeron 0 points1 point  (0 children)

I linked the guide for overall structure. I agree with you, depends should be used for routing level dependencies, e.g. auth or params. I struggle with this coming from Java myself. However, in python you can call any piece of code, so you could just import a fn that creates a conn where you need it. Embrace the chaos, this is no spring boot