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.
Este ejercicio forma parte del curso
Introduction to MongoDB in Python
Instrucciones del ejercicio
- From the
pymongo
package, importMongoClient
so you can use it. - Create a
MongoClient
instance and store it in a variableclient
.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Import MongoClient
from ____ import ____
# Create client
client = ____