Skip to content

utils

load_config(config_path)

Load and parse a YAML config file.

Parameters:

Name Type Description Default
config_path str

Path to the YAML config file.

required

Returns:

Type Description
Config

Parsed Config object.

Source code in src/payment/utils.py
18
19
20
21
22
23
24
25
26
27
28
def load_config(config_path: str) -> Config:
    """Load and parse a YAML config file.

    Args:
        config_path: Path to the YAML config file.

    Returns:
        Parsed Config object.
    """
    with open(config_path) as f:
        return Config(**yaml.safe_load(f))