Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

ryanjdillon/yamlord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yamlord

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')

About

A wrapper for the `yaml` module to easily read and write OrderedDict objects

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages