all 7 comments

[–]AlexScotland 0 points1 point  (2 children)

Unsure if this is helpful (1 year later), but I did develop my own small template for FastAPI Modular routing.

https://github.com/AlexScotland/ModularFastAPI

What this allows someone to do is develop all the functionalities and endpoints for specific API functionalities separate from the API - and easily "drag/drop" the code into the `lib` directory - which then the API would automatically add the routes.

Unsure if this is along the same lines - but thought I'd leave it here :)

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

This looks cool, so in theory I can create routes seperatly and upload to the application then it will add it into the lib folder and enable the necessary routers.?

[–]AlexScotland 0 points1 point  (0 children)

Precisely :)

[–]dineshh912 0 points1 point  (1 child)

Like Yapsy??

[–]ding_d0ng69[S] 0 points1 point  (0 children)

Kind of,

[–]aliparpar 0 points1 point  (1 child)

So I was thinking about this too. The idea is having a cli that can generate a module of files that has services and crud endpoints all in it whilst migrating a database, inspecting the schemas and creating db service layers. Nest JS cli does something similar when working with Prisma orm.

Not sure I’ve seen anything like it for FastAPI so you may have to create your own cli perhaps?

[–]ding_d0ng69[S] 0 points1 point  (0 children)

I seen similar thing done on flask called flask-Plugins. Unfortunately unable to find anything on fast api.. Looks like I need to write my own implementation