gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

ReflexApp

Object representing a Reflex app instance. This app instance is used to generate the app code and configuration files.

:param AppInstance: description :type AppInstance: type :return: description :rtype: type

Attributes
name: strparams: dictrequires_authentication: boolresource_model_id: strresources: Listuser_access_tokens: Dict
Functions
__init__

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

resource_model_id : str
name : str
shell_proxy : ShellProxy
requires_authentication : bool - True
add_user

Add the user to the list of users that can access the app and return the user access token

user_id : str
Return type : str
destroy
generate_app

Generate the dir for the process. Then inside this dir generate a dir for this app and generate the app configuration file.

working_dir : str
_description_
get_app_config

Get the app config for this app instance.

Return type : AppConfig
get_app_folder

Get the directory where the app will be generated

Return type : str
get_app_full_url
host_url : str
token : str
Return type : AppInstanceUrl
get_app_process_hash

Get the hash of the app process. If 2 hash are equal, the app will be running the in the same process. This is used to avoid running the same app in multiple processes.

Return type : str
get_app_type

Get the type of the app.

Return type : AppType
get_config_file_path
Return type : str
get_dev_config_file
Return type : str
get_front_app_build_folder

Get the folder that contains the front build of the app. This folder is created by the task that generates the app.

Return type : Optional
get_front_build_path_from_app
app_path : str
Return type : str
get_front_build_path_if_exists

Check if the front build is already generated. If the build was generated from a previous brick version, it will be deleted and considered as not built.

Return type : Optional
get_shell_proxy
Return type : ShellProxy
get_user_from_token

Get the user id from the user access token If the user does not exist, return None

user_access_token : str
Return type : Optional
is_dev_mode
Return type : bool
is_virtual_env_app
Return type : bool
set_app_config

Set the app config for this app instance. The app config is used to generate the app code and configuration files.

app_config : AppConfig
_description_
front_app_build_folder : Folder
set_app_static_folder

Set the directory where the app will be generated

app_folder_path : str
front_app_build_folder : Folder
set_dev_mode
dev_config_file : str
set_input_resources

Set the resources of the app

: param resources: description : type resources: List[str]

resources : List
set_params
params : dict
set_requires_authentication

Set if the app requires authentication. By default it requires authentication. If the app does not require authentication, the user access tokens are not used. In this case the system user is used to access the app.

: param requires_authentication: True if the app requires authentication : type requires_authentication: bool

requires_authentication : bool
to_dto
Return type : AppInstanceDTO
update_front_build_info

Update the front build brick version. This is used to update the front build version after the app is generated.

was_generated_from_resource_model_id

Return true if the app was generated from the given resource model id

resource_model_id : str
Return type : bool