from pymongo import MongoClient import os client = MongoClient(host=os.environ["MONGO_HOST"], username=os.environ["MONGO_USER"], password=os.environ["MONGO_PASSWORD"]) database = client[os.environ["MONGO_DATABASE"]]