Skip to main content
Help us improve Python packaging – donate today!

YAML loader for PyYAML that allow to keep keys order.

Project Description

This is a loader for PyYAML allowing to keep items order when loading a file. In some rare cases, it may be desired to keep the order of items when loading the YAML file. For example, this is the case of the clg module (https://pypi.python.org/pypi/clg) that generate a command-line from a dictionnary. When a YAML file is used, and in a purely esthetic purpose, it could be nice to keep order of the items.

The loader is based on stackoverflow topic: http://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts

To install it

$ pip install yamlordereddictload

To use it

import yaml
import yamlordereddictloader

datas = yaml.load(open('myfile.yml'), Loader=yamlordereddictloader.Loader)

Release history Release notifications

History Node

0.4.0

History Node

0.3.0

History Node

0.2.2

History Node

0.2.0

History Node

0.1.1

This version
History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
yamlordereddictloader-0.1.0.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None Jun 13, 2014

Supported by

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