Skip to content

Instantly share code, notes, and snippets.

@jchenj
jchenj / pymongo-test.py
Last active September 12, 2022 18:45
Python-connection
import os
from dotenv import load_dotenv
from pymongo import MongoClient, errors
# Load config from .env file
load_dotenv()
MONGODB_URI = os.environ["MONGODB_URI"]
try: