Integrating MongoDB with Flask

What is Flask?

What is MongoDB?

Here, we have created a small and good-looking web app on the flask framework. Where a user can submit a form for his issue with health and the data which is provided in the form is stored in the MongoDB database.

In the above directory structure:

from pymongo import MongoClient
client = MongoClient()
db = client.my_database
collection = db.my_collection



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store