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.
Questo esercizio fa parte del corso
Introduction to MongoDB in Python
Istruzioni dell'esercizio
- From the
pymongopackage, importMongoClientso you can use it. - Create a
MongoClientinstance and store it in a variableclient.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Import MongoClient
from ____ import ____
# Create client
client = ____