Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Ordered value getter from Dictionary type value.

Project Description

Ordered value getter from Dictionary type value.


Python 2.7 upper and 3.x

From a dictionary type, this can acquire a value in order of a methodical keys.


pip install OrderedFormat



import OrderedFormat.formatter as odf

yml_txt_data = """
  name: John
  age: 22

yml_key_txt = """
- name
- age
- name

ordered_keys = odf.load_ordered_keys(None, raw_txt=yml_key_txt, load_type="yaml")
ordered_data = odf.kflatten(yml_txt_data, ordered_keys, load_type="yaml")

# ordered_data = ("John", "John", 22, "John")

Currentry, kflatten method return flat tuple value.

When you load keys value or dict value (json/yaml file type), you can use two method.

Using Load File Data

ordered_keys = odf.load_ordered_keys("<keys_file.json | keys_file.yaml>")
dict_data = odf.load_dict_val("<dict_file.json | dict_file.yaml>")

odf.kflatten(dict_data, ordered_keys)

Available extension is “.yaml” , “.yml” and “json”.

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
OrderedFormat-0.0.2-py2.py3-none-any.whl (4.6 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 6, 2016
OrderedFormat-0.0.2.tar.gz (5.2 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting