10 lines
228 B
Python
10 lines
228 B
Python
|
import yaml
|
||
|
|
||
|
|
||
|
def yaml_encode(data, indent=None, unicode=False):
|
||
|
return yaml.dump(data, indent=indent, allow_unicode=not unicode, sort_keys=False)
|
||
|
|
||
|
|
||
|
def yaml_decode(data):
|
||
|
return yaml.load(data, Loader=yaml.CFullLoader)
|