aspy.yaml


Nameaspy.yaml JSON
Version 1.3.0 PyPI version JSON
download
home_pagehttps://github.com/asottile/aspy.yaml
SummaryA few extensions to pyyaml.
upload_time2019-05-23 18:32:02
maintainer
docs_urlNone
authorAnthony Sottile
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Build Status](https://asottile.visualstudio.com/asottile/_apis/build/status/asottile.aspy.yaml?branchName=master)](https://asottile.visualstudio.com/asottile/_build/latest?definitionId=4&branchName=master)
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/4/master.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=4&branchName=master)

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.

```python
>>> 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.

```python
>>> 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'
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/asottile/aspy.yaml",
    "name": "aspy.yaml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
    "maintainer_email": "",
    "keywords": "",
    "author": "Anthony Sottile",
    "author_email": "asottile@umich.edu",
    "download_url": "https://files.pythonhosted.org/packages/a1/e9/2ee775d3e66319e08135505a1dd3cdba606b4da4caeb617eb3514d901b14/aspy.yaml-1.3.0.tar.gz",
    "platform": "all",
    "description": "[![Build Status](https://asottile.visualstudio.com/asottile/_apis/build/status/asottile.aspy.yaml?branchName=master)](https://asottile.visualstudio.com/asottile/_build/latest?definitionId=4&branchName=master)\n[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/4/master.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=4&branchName=master)\n\naspy.yaml\n=========\n\nSome extensions to pyyaml.\n\n## Installation\n\n`pip install aspy.yaml`\n\n### aspy.yaml.ordered_load\n\nyaml.load which respects order for dictionaries in the yaml file.\n\n```python\n>>> from aspy.yaml import ordered_load\n>>> ordered_load(\n        'foo: bar\\n'\n        'bar: baz\\n'\n        'herp: derp\\n'\n    )\nOrderedDict([('foo', 'bar'), ('bar', 'baz'), ('herp', 'derp')])\n```\n\n### aspy.yaml.ordered_dump\n\nyaml.dump which respects order for dictionaries in the yaml file.\n\n```python\n>>> from aspy.yaml import ordered_dump\n>>> print(ordered_dump(\n        OrderedDict((('a', '1'), ('b', '2'), ('c', '3'), ('d', '4'))),\n        default_flow_style=False,\n    ))\na: '1'\nb: '2'\nc: '3'\nd: '4'\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A few extensions to pyyaml.",
    "version": "1.3.0",
    "project_urls": {
        "Homepage": "https://github.com/asottile/aspy.yaml"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99ce78be097b00817ccf02deaf481eb7a603eecee6fa216e82fa7848cd265449",
                "md5": "ad96ebcbdd043f9d8f608f3aecba58e3",
                "sha256": "463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc"
            },
            "downloads": -1,
            "filename": "aspy.yaml-1.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ad96ebcbdd043f9d8f608f3aecba58e3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 3453,
            "upload_time": "2019-05-23T18:32:00",
            "upload_time_iso_8601": "2019-05-23T18:32:00.695039Z",
            "url": "https://files.pythonhosted.org/packages/99/ce/78be097b00817ccf02deaf481eb7a603eecee6fa216e82fa7848cd265449/aspy.yaml-1.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1e92ee775d3e66319e08135505a1dd3cdba606b4da4caeb617eb3514d901b14",
                "md5": "1959a34873a6bdc1fba807023804867e",
                "sha256": "e7c742382eff2caed61f87a39d13f99109088e5e93f04d76eb8d4b28aa143f45"
            },
            "downloads": -1,
            "filename": "aspy.yaml-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1959a34873a6bdc1fba807023804867e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 2998,
            "upload_time": "2019-05-23T18:32:02",
            "upload_time_iso_8601": "2019-05-23T18:32:02.343542Z",
            "url": "https://files.pythonhosted.org/packages/a1/e9/2ee775d3e66319e08135505a1dd3cdba606b4da4caeb617eb3514d901b14/aspy.yaml-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-05-23 18:32:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "asottile",
    "github_project": "aspy.yaml",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "tox": true,
    "lcname": "aspy.yaml"
}
        
Elapsed time: 0.30652s