Usage eval $(python parse_yaml.py example_file.yaml) In this example the following variables are accessible: $key1 $key2_nested