5 lines
275 B
Python
Raw Normal View History

2023-10-13 21:44:30 +02:00
from pymongo import MongoClient
import os
2023-10-13 22:18:41 +02:00
client = MongoClient("mongodb+srv://{0}:{1}@{2}/?retryWrites=true&w=majority&appName=AtlasApp".format(os.environ["MONGO_USER"], os.environ["MONGO_PASSWORD"], os.environ["MONGO_HOST"]))
2023-10-13 21:44:30 +02:00
database = client[os.environ["MONGO_DATABASE"]]