Back to bricks list
Introduction
Technical Documentation
Other Classes
StreamlitApp
Version

StreamlitApp

Class to manage a streamlit app that runs inside the main streamlit app

The path of this streamlit app code is passed to the main streamlit app as a parameter of the url. The main streamlit app load and run this app code.

Attributes

app_folder_path: strapp_id: strapp_type: Literalenv_code: strenv_file_path: strparams: dictresources: Liststreamlit_code: str

Functions

__INIT__

Initialize self. See help(type(self)) for accurate signature.

Parameters:
NameTypeDefault valueDescription
app_idstr
app_typeLiteral
DESTROY
GENERATE_APP

Method to create the streamlit app code file and return the url to access the app.

Parameters:
NameTypeDefault valueDescription
working_dirstr
GET_APP_FULL_URL
Parameters:
NameTypeDefault valueDescription
host_urlstr
tokenstr
Return type:
str
GET_DEV_CONFIG_FILE
Return type:
str
GET_ENV_CODE_HASH
Return type:
str
GET_SHELL_PROXY
Return type:
ShellProxy
IS_DEV_MODE
Return type:
bool
IS_NORMAL_APP
Return type:
bool
SET_DEV_MODE
Parameters:
NameTypeDefault valueDescription
dev_config_filestr
SET_ENV_CODE
Parameters:
NameTypeDefault valueDescription
env_codestr
SET_ENV_FILE_PATH
Parameters:
NameTypeDefault valueDescription
env_file_pathstr
SET_INPUT_RESOURCES

Set the resources of the app For normal app, the resources are the source ids For env app, the resources are the file paths

Parameters:
NameTypeDefault valueDescription
resourcesList _description_ [str]
SET_PARAMS
Parameters:
NameTypeDefault valueDescription
paramsdict
SET_STREAMLIT_CODE
Parameters:
NameTypeDefault valueDescription
streamlit_codestr
SET_STREAMLIT_CODE_PATH
Parameters:
NameTypeDefault valueDescription
streamlit_app_code_pathstr
SET_STREAMLIT_FOLDER
Parameters:
NameTypeDefault valueDescription
streamlit_folder_pathstr
TO_DTO
Parameters:
NameTypeDefault valueDescription
host_urlstr
tokenstr
Return type:
StreamlitAppDTO