r/FastAPI • u/DARTH_MAMBA_ • Sep 07 '24
Question Migration from Django to FastAPI
Hi everyone,
I'm part of a college organization where we use Django for our backend, but the current system is poorly developed, making it challenging to maintain. The problem is that we have large modules with each of their logic all packed into a single "views.py" file per module (2k code lines and 60 endpoints aprox in 3 of the 5 modules of the project).
After some investigation, we've decided to migrate to FastAPI and restructure the code to improve maintainability. I'm new with FastAPI, so I'm open to any suggestions, including recommendations on tools and best practices for creating a more scalable and manageable system, any architecture I should check out.
Thanks!
View all comments
Show parent comment
1
u/DARTH_MAMBA_ Sep 12 '24
Okay, thanks! And It's not open source. The structure is a typical Django project, but 4 modules (of 11 total) are maybe too big and have 65, 60 and 40 endpoints (using url instead of path), with not inner logic division inside views.py. Also their are direct calls to Django ORM inside the logic files. Bad error management. And black magic everywhere. An unnecessary big DB (this is our biggest challenge to migrate and maintain the data) because it was made automatically with Django ORM.