Skip to content

Instantly share code, notes, and snippets.

View jpautom's full-sized avatar

J Paul jpautom

View GitHub Profile
@jpautom
jpautom / tutorial-pymongo.py
Last active March 15, 2022 13:15
Tutorial pymongo
import pymongo
# Connect
# Through a MongoDB URI. The database should contain permissions for the user, if provided
client = pymongo.MongoClient('mongodb://user:password@host/database')
# Create database
db = client["database"]
# Create collection
coll = db["collection"]