instlal PyYAML

$ pip install PyYAML

in python file, load file like the following

import yaml

somefile = '/path/file'

data = yaml.full_load(somefile)

the data in yaml file will be saved in data variable as a python dict.

Categories: python

0 Comments

Leave a Reply

Your email address will not be published.