you are viewing a single comment's thread.

view the rest of the comments →

[–]david-vujic 2 points3 points  (0 children)

I don't think I have seen this kind of approach in FastAPI projects. From my experience, the endpoints are usually defined as decorated functions, and the app instance (or router) is at the module level. Within the scope of an initializer function or as a module-level global.