# -*- coding: utf-8 -*- # @Time : 2022/2/25 17:00 # @Author : MaochengHu # @Email : wojiaohumaocheng@gmail.com # @File : load_yaml_config.py # @Project : server_develop import os import yaml def load_yaml(yaml_path: str): assert os.path.exists(yaml_path), f"cannot find {yaml_path}" with open(yaml_path, 'r', encoding='utf-8') as yaml_file: config = yaml.load(yaml_file, Loader=yaml.FullLoader) return config