get_data_from_yml

遇事不决,量子力学發表於2024-04-30
"""
@Name: data_conf.py
@Author: zengchuanyin
@Date 2023/6/11-16:19
"""

import yaml

conf_path = "conf_env.yml"

def get_data_from_yml():
with open('conf_env.yml', 'r') as file:
content = file.read()
data = yaml.load(content, Loader=yaml.FullLoader)
return data['host']['ip']+":"+data['host']['port']