2 # Copyright (c) 2015 All rights reserved
3 # This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
13 def write_dict_to_yaml(config, path):
14 with open(path, 'w+') as f:
15 yaml.safe_dump(config, f, default_flow_style=False)
18 def read_dict_from_yaml(path):
19 with open(path, 'r') as f:
20 return yaml.safe_load(f)