gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

Settings

Settings class.

This class represents to global settings of the application.

:property data: The settings data :type data: dict

Attributes
data: Dict
Functions
__init__

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

data : dict
add_brick
brick_info : BrickInfo
add_module
module_info : ModuleInfo
get_all_pip_packages
Return type : List
get_brick
brick_name : str
Return type : Optional
get_brick_data_dir

Get the data directory of a brick. It contains the data downloaded for a brick.

brick_name : str
The name of the brick
Return type : str
get_brick_data_main_dir

Get the main data director for the brick. It contains folder for each brick containing data of the brick.

Return type : str
get_brick_migration_log
brick_name : str
Return type : Optional
get_brick_migrations_logs

Retrieve the list of all brick migrations

Return type : Dict
get_bricks
Return type : Dict
get_data
k : str
default : Any
Return type : str
get_data_dir

Get the default data directory. Depending on if the lab is in dev or prod mode, the appropriate directory is returned.

Return type : str
get_file_store_dir
Return type : str
get_gws_core_db_name
Return type : str
get_kv_store_base_dir
Return type : str
get_log_dir

Get the log directory

Return type : str
get_main_settings_file_path
Return type : str
get_maria_db_backup_dir
Return type : str
get_modules
Return type : Dict
get_notebook_paths

Returns all the paths of all the brick used by the Application

Return type : str
get_pip_package
name : str
Return type : Optional
get_pip_packages
names : List
Return type : List
get_space
Return type : SpaceDict
get_variable

Returns a variable. Returns None if the variable does not exist

key : Any
Return type : str
get_variables

Returns the variables dict

Return type : dict
is_desktop_lab

True when lab is running on a desktop in prod mode

Return type : bool
is_local_dev_env

True when lab is running locally in dev mode

Return type : bool
save
Return type : bool
set_data
key : str
val : Any
set_main_settings_file_path
main_settings_file_path : str
set_pip_freeze
pip_freeze : List
set_space
space : SpaceDict
set_variable

Set a variable

key : str
value : str
to_dto
Return type : SettingsDTO
update_brick_migration_log

Add a new brick migration log and update last migration version

brick_name : str
version : str
build_log_dir @classmethod

Return the log dir

is_test : bool
Return type : str
core_api_route_path @classmethod
Return type : str
dev_api_sub_domain @classmethod
Return type : str
external_lab_api_route_path @classmethod
Return type : str
get_community_api_url @classmethod
Return type : str
get_dashboard_dev_port @classmethod
Return type : str
get_dashboard_dev_url @classmethod
Return type : str
get_front_url @classmethod
Return type : str
get_front_version @classmethod

Returns the front version of the lab

Return type : str
get_global_env_dir @classmethod
Return type : str
get_gws_core_brick_name @classmethod
Return type : str
get_gws_core_db_config @classmethod
Return type : DbConfig
get_instance @classmethod
Return type : Settings
get_lab_api_url @classmethod
Return type : str
get_lab_dev_api_url @classmethod
Return type : str
get_lab_environment @classmethod

Return the environment where the lab run ON_CLOUD : the lab is running on the cloud DESKTOP : the lab is running on a desktop LOCAL : the lab is running locally (for development purpose)

Return type : Literal
get_lab_folder @classmethod
Return type : str
get_lab_id @classmethod

Returns the name of the lab

Return type : str
get_lab_name @classmethod

Returns the name of the lab

Return type : str
get_lab_prod_api_url @classmethod
Return type : str
get_main_app_folder @classmethod
Return type : str
get_open_ai_api_key @classmethod

Return the open ai api key

Return type : str
get_root_temp_dir @classmethod

Return the root temp dir

Return type : str
get_space_api_key @classmethod

Return the space api key

Return type : str
get_space_api_url @classmethod

Return the space api url

Return type : str
get_streamlit_app_additional_hosts @classmethod

Returns available port for streamlit addtional app (running in virtual env)

Return type : List
get_streamlit_app_additional_ports @classmethod

Returns available port for streamlit addtional app (running in virtual env)

Return type : List
get_streamlit_host_url @classmethod

Returns the front version of the lab

Return type : str
get_streamlit_main_app_port @classmethod

Returns the front version of the lab

Return type : int
get_sys_bricks_folder @classmethod
Return type : str
get_test_db_config @classmethod
Return type : DbConfig
get_user_bricks_folder @classmethod
Return type : str
get_virtual_host @classmethod

Return the virtual host of the machine like tokyo.gencovery.io

Return type : str
gpu_is_available @classmethod

return true if the gpu is available

Return type : bool
init @classmethod
Return type : Settings
is_dev_mode @classmethod
Return type : bool
is_local_env @classmethod
Return type : bool
is_prod_mode @classmethod
Return type : bool
make_temp_dir @classmethod

Make a unique temp dir

Return type : str
prod_api_sub_domain @classmethod
Return type : str
retrieve @classmethod
Return type : Settings
s3_server_api_route_path @classmethod
Return type : str
space_api_route_path @classmethod
Return type : str