saneyaml


Namesaneyaml JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/nexB/saneyaml
SummaryRead and write readable YAML safely preserving order and avoiding bad surprises with unwanted infered type conversions. This library is a PyYaml wrapper with sane behaviour to read and write readable YAML safely, typically when used for configuration.
upload_time2023-01-15 16:55:36
maintainer
docs_urlNone
authornexB. Inc. and others
requires_python>=3.7
licenseApache-2.0
keywords utilities yaml pyyaml block flow
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========
saneyaml
========

This micro library is a PyYaml wrapper with sane behaviour to read and
write readable YAML safely, typically when used with configuration files.

With saneyaml you can dump readable and clean YAML and load safely any YAML
preserving ordering and avoiding surprises of type conversions by loading
everything except booleans as strings.

Optionally you can check for duplicated map keys when loading YAML.

Works with Python 3. Requires PyYAML 5.x or higher.

license: apache-2.0
homepage_url: https://github.com/nexB/saneyaml

Usage::

    pip install saneyaml
    
    >>> from  saneyaml import load
    >>> from  saneyaml import dump
    >>> a=load('''version: 3.0.0.dev6
    ... 
    ... description: |
    ...     AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
    ...     provides a way to document a software component.
    ... ''')
    >>> a
    dict([
        (u'version', u'3.0.0.dev6'), 
        (u'description', u'AboutCode Toolkit is a tool to process ABOUT files. '
        'An ABOUT file\nprovides a way to document a software component.\n')])
    
    >>> pprint(a.items())
    [(u'version', u'3.0.0.dev6'),
     (u'description',
      u'AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file\nprovides a way to document a software component.\n')]
    >>> print(dump(a))
    version: 3.0.0.dev6
    description: |
      AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
      provides a way to document a software component.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nexB/saneyaml",
    "name": "saneyaml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "utilities,yaml,pyyaml,block,flow",
    "author": "nexB. Inc. and others",
    "author_email": "info@aboutcode.org",
    "download_url": "https://files.pythonhosted.org/packages/10/1c/f4589ed6fc28a0a3500c79a9b8bf924a2c5fe1a0116104ba0ce735315980/saneyaml-0.6.0.tar.gz",
    "platform": null,
    "description": "========\nsaneyaml\n========\n\nThis micro library is a PyYaml wrapper with sane behaviour to read and\nwrite readable YAML safely, typically when used with configuration files.\n\nWith saneyaml you can dump readable and clean YAML and load safely any YAML\npreserving ordering and avoiding surprises of type conversions by loading\neverything except booleans as strings.\n\nOptionally you can check for duplicated map keys when loading YAML.\n\nWorks with Python 3. Requires PyYAML 5.x or higher.\n\nlicense: apache-2.0\nhomepage_url: https://github.com/nexB/saneyaml\n\nUsage::\n\n    pip install saneyaml\n    \n    >>> from  saneyaml import load\n    >>> from  saneyaml import dump\n    >>> a=load('''version: 3.0.0.dev6\n    ... \n    ... description: |\n    ...     AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file\n    ...     provides a way to document a software component.\n    ... ''')\n    >>> a\n    dict([\n        (u'version', u'3.0.0.dev6'), \n        (u'description', u'AboutCode Toolkit is a tool to process ABOUT files. '\n        'An ABOUT file\\nprovides a way to document a software component.\\n')])\n    \n    >>> pprint(a.items())\n    [(u'version', u'3.0.0.dev6'),\n     (u'description',\n      u'AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file\\nprovides a way to document a software component.\\n')]\n    >>> print(dump(a))\n    version: 3.0.0.dev6\n    description: |\n      AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file\n      provides a way to document a software component.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Read and write readable YAML safely preserving order and avoiding bad surprises with unwanted infered type conversions. This library is a PyYaml wrapper with sane behaviour to read and write readable YAML safely, typically when used for configuration.",
    "version": "0.6.0",
    "split_keywords": [
        "utilities",
        "yaml",
        "pyyaml",
        "block",
        "flow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e08b5216a1f1ecad5510975cbd5619c04cc615be25c4062214dca3a4a8ce957",
                "md5": "affa2fb6c0ceb87044c2fb2972dacb68",
                "sha256": "9fdf69e8fe30882221e4bf26eebd34b0fe645478e53ea10231aa49d8d949d8c7"
            },
            "downloads": -1,
            "filename": "saneyaml-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "affa2fb6c0ceb87044c2fb2972dacb68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13011,
            "upload_time": "2023-01-15T16:55:34",
            "upload_time_iso_8601": "2023-01-15T16:55:34.367024Z",
            "url": "https://files.pythonhosted.org/packages/4e/08/b5216a1f1ecad5510975cbd5619c04cc615be25c4062214dca3a4a8ce957/saneyaml-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "101cf4589ed6fc28a0a3500c79a9b8bf924a2c5fe1a0116104ba0ce735315980",
                "md5": "7369bae2778042790470462963c0c0a0",
                "sha256": "b2309f7836623cd6db932574ebbc43e3f65c743e7635179e64beecb0d1626e44"
            },
            "downloads": -1,
            "filename": "saneyaml-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7369bae2778042790470462963c0c0a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 81878,
            "upload_time": "2023-01-15T16:55:36",
            "upload_time_iso_8601": "2023-01-15T16:55:36.007626Z",
            "url": "https://files.pythonhosted.org/packages/10/1c/f4589ed6fc28a0a3500c79a9b8bf924a2c5fe1a0116104ba0ce735315980/saneyaml-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-15 16:55:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nexB",
    "github_project": "saneyaml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "appveyor": true,
    "requirements": [],
    "lcname": "saneyaml"
}
        
Elapsed time: 0.03862s