Needs advice
on
Django REST frameworkDjango REST framework
and
FastAPIFastAPI

Not sure if we should use DRF or FastAPI. I hear many good things about FastAPI, but it doesn't seem to have a big community. Most important things for us: - speed - ease of development - scalability & security

We're likely going to use MongoDB, so not sure if that changes anything. Would appreciate any help!

READ LESS
5 upvotes·62.4K views
Replies (4)
Full Stack Engineer-Freelancer at HemansAI·
Recommends
on
FastAPI

I have worked with both frameworks, for your use case I would recommend using FastAPI. DRF, is no doubt an amazing framework and makes various things easy, but Django's MongoDB support is not that good currently, and since its a big framework, there are various things DRF and Django automatically do when you are using their predefined backend engines, which is not in the case of the MonoDB a NoSQL db. FastAPI will give you the flexibility and speed, for the community front, its also growing quite well there.

READ MORE
5 upvotes·1 comment·30.4K views
dagrimm
dagrimm
·
June 4th 2021 at 9:03AM

I think you ask the wrong questions. "Most important things - speed - ease of development - scalability & security" are more ops related tasks and can be handled by both frameworks well. You should ask what the framework should do - fastAPI is perfect for REST APIs, DRF is a REST framework on top of Django. So, if you have an application, where you build a user management system, CRM, analytics, etc. and you want to have a REST API on top of the monolithic backend, DRF might suit you well. If you are about smaller services with the focus on the REST part, fastAPI might fit you better. On the Mongo part, I agree that DRF is opinionated towards relational databases.

·
Reply
ETL Developer at Tellus Home·
Recommends
on
FastAPI

FastAPI might not have a big community but the documentation is awesome and covers every aspect of the framework itself. I'd recommend coming up with a pilot project yourself and try it on your own. It has a bit learning curve as FastAPI itself is a combo of a few existing projects otherwise it is amazing.

READ MORE
5 upvotes·29.8K views
View all (4)
Avatar of David Abaev