Okay so I have Flask installed and I am wondering how I can connect and use a MongoDB database with a Flask app that I am starting to build soon.
You can use any of these three libraries
I personally use flask mongoengine and every things work fine
I personally find the PyMongo library simple and easy to use.
You first need to import MongoClient and create a connection:
from pymongo import MongoClient
client = MongoClient()
Then get your db instance and collection (table):
db = client.my_database
collection = db.my_collection
You can then manipulate your data by working with JSON documents that hold your data. There is a complete example on their website.
Take a look at this tutorial on how to use PyMongo.
Maybe you don't have to use special libraries for Flask to connect to MongoDB.
Just treat Flask application as a normal Python program, and connect to MongoDB via normal Python libraries like PyMongo.
Here's an example by someone else. A Flask app connecting to MongoDB via PyMongo.