genetic_forensic_portal.app.common package¶
Contains common functionality used throughout the application.
Modules: - constants: Contains constants used throughout the application. - download_buttons: Contains Streamlit buttons for downloading files while handling auth decisions. Contained here because it is used in multiple places. - setup.py: Contains the logic run at the top of every Streamlit page to set up the session state and check for authentication. Other code that should be run at the top of every Streamlit page should be added here.
Submodules¶
genetic_forensic_portal.app.common.constants module¶
Contains constants used throughout the application.
Types of constants found in this module: - Authentication session state keys - Sample, canned analysis “UUID”s used for testing
genetic_forensic_portal.app.common.setup module¶
Contains the logic run at the top of every Streamlit page to set up the session state and check for authentication.
Other code that should be run at the top of every Streamlit page should be added here.
- genetic_forensic_portal.app.common.setup.authentication_dialog()¶
Create the login form for the user to authenticate.
- Return type:
- genetic_forensic_portal.app.common.setup.authentication_logout()¶
Create the logout confirmation dialog for the user to confirm logging out.
- Return type:
- genetic_forensic_portal.app.common.setup.create_authentication()¶
Create the authentication flow for the user to log in and log out.
- Return type:
- genetic_forensic_portal.app.common.setup.initialize()¶
Initialize the session state and create the authentication flow.
- Return type:
- genetic_forensic_portal.app.common.setup.initialize_session_state()¶
Initialize the session state variables used for authentication.
- Return type:
- genetic_forensic_portal.app.common.setup.login_success(message, username, token)¶
Set the session state variables when a user successfully logs in.