Connecting to a MongoDB server
To get started you need to connect to a MongoDB server from inside Python. The pymongo package provides the MongoClient for this.
Deze oefening maakt deel uit van de cursus
Introduction to MongoDB in Python
Oefeninstructies
- From the
pymongopackage, importMongoClientso you can use it. - Create a
MongoClientinstance and store it in a variableclient.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Import MongoClient
from ____ import ____
# Create client
client = ____