7 lines
395 B
Python
7 lines
395 B
Python
from pymongo import MongoClient
|
|
import os, redis
|
|
|
|
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"]))
|
|
database = client[os.environ["MONGO_DATABASE"]]
|
|
|
|
connect_redis = redis.Redis(host=os.environ["REDIS_URL"], port=os.environ["REDIS_PORT"], decode_responses=True) |