symphony.bdk.core.config.loader.BdkConfigLoader#

class symphony.bdk.core.config.loader.BdkConfigLoader#

Bases: object

Config loader class

Provide methods to load a JSON or YAML configuration from an absolute path or $HOME/.symphony` directory or string object to a BdkConfig object.

__init__()#

Methods

__init__()

load_from_content(content)

Load config from a string containing all config

load_from_file(config_path)

Load config from an absolute filepath

load_from_symphony_dir(relative_path)

Load BdkConfig from a relative path located in the .symphony directory.

classmethod load_from_content(content: str) symphony.bdk.core.config.model.bdk_config.BdkConfig#

Load config from a string containing all config

Parameters

content – Content of the config file as one string

Returns

Symphony bot configuration object

classmethod load_from_file(config_path: str) symphony.bdk.core.config.model.bdk_config.BdkConfig#

Load config from an absolute filepath

Parameters

config_path – Configuration file absolute path

Returns

Symphony bot configuration object

classmethod load_from_symphony_dir(relative_path: str) symphony.bdk.core.config.model.bdk_config.BdkConfig#

Load BdkConfig from a relative path located in the .symphony directory.

Note: The .symphony directory is located under your home directory. It’s a convention adopted in order to avoid storing sensitive information (such as usernames, private keys…) within the code base.

Parameters

relative_path – configuration’s relative path from the $HOME/.symphony directory

Returns

Symphony bot configuration object