Money_IMP / app.py
1mpreccable's picture
debug
378ebdc
# import streamlit as st
# import streamlit_authenticator as stauth
# import os
# admin_email = os.getenv("ADMIN_EMAIL")
# admin_pass = os.getenv("ADMIN_PASS")
# admin_username = os.getenv("ADMIN_USERNAME")
# cookie_signature_key = os.getenv("COOKIE_SIGNATURE_KEY")
# credentials = {
# 'usernames': {
# 'impreccable': {
# 'email': admin_email,
# 'name': admin_username,
# 'password': admin_pass
# }
# }
# }
# cookie_config = {
# 'name': 'some_cookie_name',
# 'key': cookie_signature_key,
# 'expiry_days': 30
# }
# authenticator = stauth.Authenticate(
# credentials,
# cookie_config['name'],
# cookie_config['key'],
# cookie_config['expiry_days']
# )
# try:
# authenticator.login()
# if st.session_state['authentication_status']:
# st.session_state['logged_in'] = True
# authenticator.logout()
# st.write(f'Welcome *{st.session_state["name"]}*')
# st.title('Some content')
# elif st.session_state['authentication_status'] is False:
# st.error('Username/password is incorrect')
# elif st.session_state['authentication_status'] is None:
# st.warning('Please enter your username and password')
# except KeyError:
# st.error('Please check your configuration file')