from symphony.bdk.core.config.loader import BdkConfigLoader

config_1 = BdkConfigLoader.load_from_file("/absolute/path/to/config.yaml")

with open("/absolute/path/to/config.yaml") as config_file:
    config_2 = BdkConfigLoader.load_from_content(config_file.read())

config_3 = BdkConfigLoader.load_from_symphony_dir("config.yaml")
예제 #2
0
def test_load_from_content(simple_config_path):
    config_path = Path(simple_config_path)
    content = config_path.read_text()
    config = BdkConfigLoader.load_from_content(content)
    assert config.bot.username == "youbot"