Skip to main content

buildstatus coverage

Ordered value getter from Dictionary type value.

Requirements

Python 2.7 upper and 3.x

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

Install

pip install OrderedFormat

Usage

QuickStart

import OrderedFormat.formatter as odf

yml_txt_data = """
human:
  name: John
  age: 22
"""

yml_key_txt = """
human:
- 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 files for OrderedFormat 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OrderedFormat 0.0.2
File Size Uploaded
OrderedFormat-0.0.2.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OrderedFormat 0.0.2
File Interpreter ABI Platform
OrderedFormat-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.8 kB

Release files / OrderedFormat-0.0.2.tar.gz

Download URL OrderedFormat-0.0.2.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc561b14ef183fea172b4f8993032e3c3da27636874a966e2b1bf3465ef6c57f
BLAKE2b-256 checksum
How to use checksums
0685dac043bfbb14434f5ff691b9b15fd8155bb32c4922922ac40b0cc330c106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / OrderedFormat-0.0.2-py2.py3-none-any.whl

Download URL OrderedFormat-0.0.2-py2.py3-none-any.whl
Size 4.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
da0dbd8e60ff136746bee9be03398151ff0a581c71988cff0c6a94a41a464f9c
BLAKE2b-256 checksum
How to use checksums
5f2a7c9047d65cb72af9036660236a72a278f4e3544b0b8fa190d72577cec773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page