gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

AppsManager

Class to manage the different apps

All the normal apps (without env) run in the same streamlit process (8501) the env apps run in different processes with different ports. One process per env.

Attributes
app_dir: strrunning_processes: Dict
Functions
create_or_get_app @classmethod
app : AppInstance
Return type : AppInstanceUrl
create_or_get_app_async @classmethod

Create app asynchronously and return the app ID. The app will be started in background.

app : AppInstance
Return type : CreateAppAsyncResultDTO
find_app_by_resource_model_id @classmethod

Find the streamlit app that was generated from the given resource model id

resource_model_id : str
Return type : gws_core.apps.app_instance.AppInstance | None
find_process_by_token @classmethod

Find the process that contains the app with the given token

token : str
Return type : gws_core.apps.app_process.AppProcess | None
find_process_of_app @classmethod

Find the process that contains the app with the given resource model id

resource_model_id : str
Return type : gws_core.apps.app_process.AppProcess | None
get_app_dir @classmethod
Return type : str
get_app_full_url @classmethod
app_id : str
Return type : AppInstanceUrl
get_status_dto @classmethod
Return type : AppsStatusDTO
stop_all_processes @classmethod
stop_process @classmethod
env_hash : str
user_has_access_to_app @classmethod

Return the user id from the user access token if the user has access to the app

app_id : str
user_access_token : str
Return type : str | None