PortalLVAM / Data /credentials.py
bullm's picture
Upload credentials.py
5561cdd
raw
history blame
1.05 kB
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 11 21:08:28 2022
@author: bullm
"""
import os
import streamlit as st
try:
credentials_s3 = {
"S3_BUCKET": st.secrets['S3_BUCKET'],
"S3_KEY_ID": st.secrets['S3_KEY_ID'],
"S3_SECRET_KEY": st.secrets["S3_SECRET_KEY"]
}
except Exception:
credentials_s3 = {
"S3_BUCKET": os.environ.get('S3_BUCKET'),
"S3_KEY_ID": os.environ.get('S3_KEY_ID'),
"S3_SECRET_KEY": os.environ.get("S3_SECRET_KEY")
}
try:
credentials_postgresql = {
"POSTGRESQL": st.secrets["HEROKU_POSTGRESQL_COBALT_URL"]
}
except Exception:
credentials_postgresql = {
"POSTGRESQL": os.environ.get("HEROKU_POSTGRESQL_COBALT_URL")
}
try:
credentials_mailer = {
"EMAILPASS": st.secrets["EMAIL_PASSWORD"],
"EMAILSENDER": st.secrets["EMAIL_SENDER"]
}
except Exception:
credentials_mailer = {
"EMAILPASS": os.environ.get("EMAIL_PASSWORD"),
"EMAILSENDER": os.environ.get("EMAIL_SENDER")
}