This repository has been archived on 2024-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
db-manager/src/mongo.py

9 lines
322 B
Python
Raw Normal View History

2023-02-11 15:16:25 +00:00
import os
from pymongo import MongoClient
import urllib.parse
import logger as log
log.out("mongo.py: Fetching configuration", "INFO")
db_url = os.getenv('OWL_DB_HOST') + ":" + os.getenv('OWL_DB_PORT')
db_user = urllib.parse.quote_plus(os.getenv('OWL_DB_USER'))
db_pass = urllib.parse.quote_plus(os.getenv('OWL_DB_PASS'))