saneyaml


Namesaneyaml JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/aboutcode-org/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_time2024-08-14 06:25:39
maintainerNone
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/aboutcode-org/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/aboutcode-org/saneyaml",
    "name": "saneyaml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "utilities, yaml, pyyaml, block, flow",
    "author": "nexB. Inc. and others",
    "author_email": "info@aboutcode.org",
    "download_url": "https://files.pythonhosted.org/packages/18/bb/b3ab128fe13964fc8da25ecbac82f9ed9beb59b2e04bfbef433886f1acb0/saneyaml-0.6.1.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/aboutcode-org/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.1",
    "project_urls": {
        "Homepage": "https://github.com/aboutcode-org/saneyaml"
    },
    "split_keywords": [
        "utilities",
        " yaml",
        " pyyaml",
        " block",
        " flow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eac0b41733920cef3d87ee7d1fd5a618c7bb5240ba80dd2f29c73ec3416b3e04",
                "md5": "47c80e3186ef3116ff2b0eb6d5c1fa71",
                "sha256": "60553363ac55433cef2bc1d6c5a1c9f6e2787e5f40e8c6fad5983eb701592c5b"
            },
            "downloads": -1,
            "filename": "saneyaml-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "47c80e3186ef3116ff2b0eb6d5c1fa71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13063,
            "upload_time": "2024-08-14T06:25:38",
            "upload_time_iso_8601": "2024-08-14T06:25:38.505778Z",
            "url": "https://files.pythonhosted.org/packages/ea/c0/b41733920cef3d87ee7d1fd5a618c7bb5240ba80dd2f29c73ec3416b3e04/saneyaml-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18bbb3ab128fe13964fc8da25ecbac82f9ed9beb59b2e04bfbef433886f1acb0",
                "md5": "0ab1ec694c2c004035d1d42c17ac47b0",
                "sha256": "19cfbd8bf94d730998162c790fe5cec9abb5300cc5890fe37dc6dbcaa8fb16bb"
            },
            "downloads": -1,
            "filename": "saneyaml-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0ab1ec694c2c004035d1d42c17ac47b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 82235,
            "upload_time": "2024-08-14T06:25:39",
            "upload_time_iso_8601": "2024-08-14T06:25:39.665542Z",
            "url": "https://files.pythonhosted.org/packages/18/bb/b3ab128fe13964fc8da25ecbac82f9ed9beb59b2e04bfbef433886f1acb0/saneyaml-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-14 06:25:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aboutcode-org",
    "github_project": "saneyaml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "appveyor": true,
    "requirements": [],
    "lcname": "saneyaml"
}
        
Elapsed time: 0.33603s