A few extensions to pyyaml.
Project description
aspy.yaml
Some extensions to pyyaml.
Installation
pip install aspy.yaml
aspy.yaml.ordered_load
yaml.load which respects order for dictionaries in the yaml file.
>>> from aspy.yaml import ordered_load
>>> ordered_load(
'foo: bar\n'
'bar: baz\n'
'herp: derp\n'
)
OrderedDict([('foo', 'bar'), ('bar', 'baz'), ('herp', 'derp')])
aspy.yaml.ordered_dump
yaml.dump which respects order for dictionaries in the yaml file.
>>> from aspy.yaml import ordered_dump
>>> print(ordered_dump(
OrderedDict((('a', '1'), ('b', '2'), ('c', '3'), ('d', '4'))),
default_flow_style=False,
))
a: '1'
b: '2'
c: '3'
d: '4'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aspy.yaml-1.2.0.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file aspy.yaml-1.2.0.tar.gz
.
File metadata
- Download URL: aspy.yaml-1.2.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae249074803e8b957c83fdd82a99160d0d6d26dff9ba81ba608b42eebd7d8cd3 |
|
MD5 | 8151e2c765bb2dedcf226a35769bced4 |
|
BLAKE2b-256 | 4da76a5b49ac9d7b2c996b36c1f5df0a575cff5a70d1151a080b4cbf96bcb8a8 |
Provenance
File details
Details for the file aspy.yaml-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: aspy.yaml-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7390d79f58eb9157406966201abf26da0d56c07e0ff0deadc39c8f4dbc13482 |
|
MD5 | 541af01e509ee3d0caabcec39a9d3a26 |
|
BLAKE2b-256 | c0158f38955cbd3bf2f1bfbf7bec2a22517cdd098aa8eee60dafe49b2f7fd405 |