yaml
- pycharm 安装 pyyaml
- 官方文档:https://pyyaml.org/wiki/PyYAMLDocumentation
- 方法:
yaml.safe_load(stream) 将yaml格式文档 转换成 python对象
yaml.safe_dump() 将python对象 转成 yaml 格式
import yaml
with open(xx.yaml) as f:
yaml.safe_load(f)
print(yaml.safe_load
import yaml
with open(xx.yaml) as f:
yaml.safe_load(f)
print(yaml.safe_load