7 lines
395 B
Python
Raw Permalink Normal View History

2023-10-13 21:44:30 +02:00
from pymongo import MongoClient
2023-10-15 16:48:58 +02:00
import os, redis
2023-10-13 21:44:30 +02:00
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-15 16:48:58 +02:00
database = client[os.environ["MONGO_DATABASE"]]
connect_redis = redis.Redis(host=os.environ["REDIS_URL"], port=os.environ["REDIS_PORT"], decode_responses=True)