MongoDB Client#
What is MongoDB Client?#
The MongoClient() class for the PyMongo driver library for MongoDB creates client instances. Its main function is to enable you to connect to the MongoDB database efficiently and effortlessly.
Install pymongo: See https://pymongo.readthedocs.io/en/stable/installation.html
Note
$ python3 -m pip install pymongo
!pip install pymongo
Create MongoClient
You can specify the client:
mongodb_url = "mongodb+srv://readonly:readonly@covid-19.hip2i.mongodb.net/covid19"
client = MongoClient(mongodb_url)