Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

wrapper for yaml package to read/write OrderedDict

Project description

A wrapper for the yaml module to easily read and write OrderedDict objects to and from YAML formatted files.

Install

pip install yamlord

Usage

The usage is straightforward: make and OrderedDict then write it to a specified path, or read a YAML file from a specified path to an OrderedDict. That’s it.

from collections import OrderedDict
import yamlord

# Make an Ordered dict for testing
d = OrderedDict()
d['a'] = 1
d['b'] = ['str1', 'str2']

# Write OrderedDict to YAML file
yamlord.write_yaml(d, './test.yaml')

# Read YAML file to OrderedDict
d = yamlord.read_yaml('./test.yaml')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for yamlord, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size yamlord-0.4.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page