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!
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.
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.
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.