Straighforward wrapper around Ruamel Yaml
Project description
Install
pip install ez_yaml
Use
import ez_yaml
# to_string(obj, options={})
ez_yaml.to_string({"thing": 1, "abc": [ 1,2,3 ]})
# to_object(file_path, options={})
# to_object(string , options={})
ez_yaml.to_object(string='''
thing: 1
abc:
- 1
- 2
- 3
''')
# to_file(obj, file_path, options={})
ez_yaml.to_file(
{"thing": 1, "abc": [ 1,2,3 ]},
file_path="./my_file.yaml",
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ez_yaml-2.0.2.tar.gz
(380.1 kB
view hashes)
Built Distribution
ez_yaml-2.0.2-py3-none-any.whl
(605.4 kB
view hashes)