Skip to main content

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


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.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

ez_yaml-2.0.0-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page