File size: 1,054 Bytes
5561cdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- 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")
        }