What is the best(Django vs Flask) framework to build just the REST API without UI part, and which one works better with MongoDB.
Read next

I Already Know React Js, Should i also Learn Angular JS, and over the both of them, which would you prefer Angular or React
Reuben Coutinho -

My javascript / tech / web development newsletter for 06-02-2021 is out!
Mark Smith -

What was your win this week?
Gracie Gregory (she/her) -

Scraping Web - Awesome Facts
Siddharth Chandra -
Discussion (4)
It depends on your use case, if your going with Django it's not advised to use MongoDB but opt for PostGres.
If your planning to use Flask go MongoDB instead by PyDanny.
who is one of the maintainer of cookiecutter project and other Django related projects plus his book called Two Scoops of Django was my goto book when I first started out developing in Django
You can look at the reasoning on why at this When to Use MongoDB with Django
I don't think of Flask as a framework, but rather a library. It is lightweight.
Django, on the other side, is a full fledged framework with a whole lot of features. We are talking ORM, server side rendering, REST and Web features.
Flask will not solve any issue regarding MongoDB, but you can get a library there and work with that. Django, AFAIK, does not work well with Mongo.
I would stick with Flask if you just want a REST API, without UI. And I also recommend connexion.
Best will always be relative.
Personally I recommend you look at connexion that is built on top of Flask.
Thank you.. Let me check it out...