Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python yaml to dict

import yaml

with open("/home/ubuntu/data.yaml", 'r') as stream:
    try:
        parsed_yaml=yaml.safe_load(stream)
        print(parsed_yaml)
    except yaml.YAMLError as exc:
        print(exc)
 
PREVIOUS NEXT
Tagged: #python #yaml #dict
ADD COMMENT
Topic
Name
7+9 =