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

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

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: dict | Nonerequires_authentication: boolresource_model_id: strresources: list[gws_core.resource.resource.Resource] | None
Functions
__init__

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

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

Clear the Reflex app cache by deleting specific folders. Deletes the following folders if they exist:

  • .states
  • .web
  • assets/external
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_type

Get the type of the app.

Return type : AppType
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 : gws_core.impl.file.folder.Folder | None
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 : str | None
get_shell_proxy
Return type : ShellProxy
get_source_ids

Get the source ids of the app

Return type : list
is_dev_mode
Return type : bool
is_enterprise
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
set_dev_user

Set the user to be used in dev mode and return the user access token

user_id : str
set_input_resources

Set the resources of the app

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

resources : list
set_is_enterprise
is_enterprise : bool
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
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.