python之读取配置文件yml格式

import yaml
records_info = yaml.load(open(record_conf, encoding='utf8').read(), yaml.FullLoader)
# 配置文件格式如下
- name: "xxx"
  comment: "xxx"
  prefix: 2x00/0
  keep_type: day
  keep_value: 30

 

posted @ 2022-07-09 12:13    阅读(103)  评论(0编辑  收藏  举报