first commit

This commit is contained in:
2026-05-21 08:40:24 -04:00
commit b084545275
711 changed files with 3659856 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import yaml
from streamlit_authenticator import Authenticate
from yaml.loader import SafeLoader
import streamlit_authenticator as stauth
def load_auth_config(config_path) -> Authenticate:
try:
with open(config_path) as file:
config = yaml.load(file, Loader=SafeLoader)
authenticator = stauth.Authenticate(
config['credentials'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days'],
auto_hash = True
)
return authenticator
except FileNotFoundError:
return None #pyright:ignore