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.
access_mode: AppAccessModeapp_folder_path: str | Nonecustom_subdomain: str | Noneenable_debugger: boolname: strparams: dict | Noneresource_model_id: strresources: list[gws_core.resource.resource.Resource] | Nonestop_policy: AppStopPolicystreamlit_code: str | NoneInitialize self. See help(type(self)) for accurate signature.
strstrShellProxyAppAccessMode - AppAccessMode.AUTHENTICATEDGenerate the streamlit app code if this is using streamlit_code attribute.
strGet the app folder path where the main.py is located.
strGet the type of the app.
AppTypeShellProxyGet the source references passed to the app, stored in the config file.
For virtual environment apps, the app runs in an isolated env that cannot load gws_core to resolve model ids to resources. So the file paths are passed instead. Only FSNode resources are supported for virtual environment apps.
For normal apps, the resource model ids are passed.
listGet the user's main.py file path.
strboolboolSet the access mode of the app. By default the app is AUTHENTICATED.
AppAccessModeSet the custom subdomain used to build the app host. When None, the host falls back to the resource model id.
str | NoneSet the user to be used in dev mode and return the user access token
strboolSet the resources of the app
: param resources: description : type resources: List[str]
listdictBack-compat shim for the former boolean flag. Maps True to AUTHENTICATED and False to PUBLIC (anonymous). Prefer set_access_mode for new code.
: param requires_authentication: True if the app requires authentication : type requires_authentication: bool
boolSet how the app should be stopped when no connections are detected. By default (AUTO), the app is automatically stopped when no connections are detected.
AppStopPolicystrstrstrAppInstanceDTOWhether the app URL carries the access token (and a user access token).
True for AUTHENTICATED (only the launcher may open it). False for PUBLIC, whose URL is bare and shareable.
boolReturn true if the app was generated from the given resource model id
strbool