Comece agoraComece grátis

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 exercicio faz parte do curso

Introduction to MongoDB in Python

Ver curso

Instruções do exercicio

  • From the pymongo package, import MongoClient so you can use it.
  • Create a MongoClient instance and store it in a variable client.

exercicio interativo prático

Tente este exercicio completando este código de exemplo.

# Import MongoClient
from ____ import ____ 

# Create client
client = ____
Editar e Executar Código