Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

AppsManager

Class to manage the different apps.

Each app runs in its own dedicated process.

Attributes
app_dir: str | Nonerunning_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_process.AppProcess | 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
get_app_dir @classmethod
Return type : str
get_logs_of_app @classmethod

Read the server log filtered by the app id

app_id : str
the resource model id of the app
from_page_date : datetime.datetime | None
the date to start reading from (for pagination)
Return type : LogsBetweenDates
get_status_dto @classmethod
Return type : AppsStatusDTO
init @classmethod

Register signal handlers to gracefully stop all processes on exit

stop_all_processes @classmethod
stop_process @classmethod
app_id : 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
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.