PortalLVAM / modules /mongo /mongo_api /mongo_credentials.py
bullm's picture
new test
e2f925b
raw
history blame contribute delete
824 Bytes
import os
import streamlit as st
try:
credentials = {
"user": st.secrets['MONGO_USER'],
"password": st.secrets['MONGO_PASSWORD'],
"dbname": str(st.secrets['MONGO_DB']),
"host": st.secrets['MONGO_HOST'],
"args": "test?retryWrites=true&w=majority",
"port": int(st.secrets['MONGO_PORT'])
}
except:
credentials = {
"user": 'quantUser',
"password": 'Quant.L4rr4?',
"dbname": 'QuantRepo',
"host": 'quant-main.5pkxp.mongodb.net',
"args": "test?retryWrites=true&w=majority",
"port": 27017
}
# credentials = {
# "user": 'quantUser',
# "password": 'Quant.L4rr4?',
# "dbname": 'QuantRepo',
# "host": 'quant-main.5pkxp.mongodb.net',
# "args": "test?retryWrites=true&w=majority",
# "port": 27017
# }