# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-yamlordereddictloader VERSION= 0.4.2 KEYWORDS= python VARIANTS= v12 v13 SDESC[v12]= Ordered YAML loader and dump for PyYAML (3.12) SDESC[v13]= Ordered YAML loader and dump for PyYAML (3.13) HOMEPAGE= https://github.com/fmenabe/python-yamlordereddictloader CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/d3/b6/64e84e26c52343dc48e9ffefd7d5e82b986f3bc2bd6da753420f41645718 DISTFILE[1]= yamlordereddictloader-0.4.2-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v12]= single SPKGS[v13]= single OPTIONS_AVAILABLE= PY312 PY313 OPTIONS_STANDARD= none VOPTS[v12]= PY312=ON PY313=OFF VOPTS[v13]= PY312=OFF PY313=ON DISTNAME= yamlordereddictloader-0.4.2.dist-info GENERATED= yes [PY312].RUN_DEPENDS_ON= python-PyYAML:single:v12 [PY312].USES_ON= python:v12,wheel [PY313].RUN_DEPENDS_ON= python-PyYAML:single:v13 [PY313].USES_ON= python:v13,wheel [FILE:2135:descriptions/desc.single] python-yamlordereddictloader ============================ **DEPRECATED: the** `Phynix/yamlloader `_ **project provide an improved version of this library with unit tests, performance improvements (by providing access to the C implementation of PyYAML) and is more actively developed. You should use it!** :alt: License :alt: Versions :alt: PyPi :alt: Code repo :alt: Code Health This module provide a loader and a dumper for PyYAML allowing to keep items order when loading a file (by putting them in OrderedDict objects) and to manage OrderedDict objects when dumping to a file. The loader is based on stackoverflow topic (thanks to Eric Naeseth): http://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts#answer-5121963 Self promotion: I use it a lot with [clg], which allows to generate command-line definition from a configuration file, for keeping order of subcommands, options and arguments in the help message! To install it ------------- .. code-block:: bash $ pip install yamlordereddictloader Loader usage ------------ .. code-block:: python import yaml import yamlordereddictloader data = yaml.load(open('myfile.yml'), Loader=yamlordereddictloader.Loader) **Note:** For using the safe loader (which want standard YAML tags and does not construct arbitrary Python objects), replace ``yamlorderdictloader.Loader by yamlorderedictloader.SafeLoader``. Dumper usage ------------ .. code-block:: python import yaml import yamlordereddictloader from collections import OrderedDict data = OrderedDict([ ('key1', 'val1'), ('key2', OrderedDict([('key21', 'val21'), ('key22', 'val22')])) ]) yaml.dump( data, open('myfile.yml', 'w'), Dumper=yamlordereddictloader.Dumper, default_flow_style=False) **Note:** For using the safe dumper (which produce standard YAML tags and does not represent arbitrary Python objects), replace ``yamlorderdictloader.Dumper by yamlorderedictloader.SafeDumper``. [FILE:134:distinfo] dc048adb67026786cd24119bd71241f35bc8b0fd37d24b415c37bbc8049f9cd7 4190 python-src/yamlordereddictloader-0.4.2-py3-none-any.whl