pyangbind


Namepyangbind JSON
Version 0.8.5 PyPI version JSON
download
home_pagehttps://github.com/robshakir/pyangbind
SummaryPyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model.
upload_time2024-02-29 09:51:20
maintainer
docs_urlNone
authorRob Shakir
requires_python>=3.7
licenseApache License, Version 2.0
keywords yang pyang
VCS
bugtrack_url
requirements pyang lxml regex six enum34
Travis-CI No Travis.
coveralls test coverage
            PyangBind
=========

PyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model.

This module provides the supporting classes and functions that PyangBind modules utilise, particularly:

* pyangbind.base.PybindBase - which is the parent class inherited by all container or module YANG objects.

* pyangbind.pybindJSON - which containers wrapper functions which can be used to help with serialisation of YANG to JSON.

* pyangbind.serialise.pybindJSONEncoder - a class that can be used as a custom encoder for the JSON module to serialise PyangBind class hierarchies to JSON.

* pyangbind.serialise.pybindJSONDecoder - a class that can be used as a custom decoder to load JSON-encoded instances of YANG models into a PyangBind class hierarchy.

* pyangbind.xpathhelper.YANGPathHelper - a class which can have objects registered against it, and subsequently retrieved from it using XPATH expressions. This module also includes parent classes that can be used to implement other helper modules of this nature.

* pyangbind.yangtypes: The various functions which generate python types that are used to represent YANG types, and some helper methods.

  - pyangbind.yangtypes.is_yang_list and is_yang_leaflist are self explainatory, but may be useful.

  - pyangbind.yangtypes.safe_name is used throughout PyangBind to determine how to map YANG element names into Python attribute names safely.

  - pyangbind.yangtypes.RestrictedPrecisionDecimalType - generates wrapped Decimal types that has a restricted set of decimal digits - i.e., can deal with fraction-digits arguments in YANG.

  - pyangbind.yangtypes.RestrictedClassType - generates types which wrap a 'base' type (e.g., integer) with particular restrictions. The restrictions are supplied as a dictionary, or with specific arguments if single restrictions are required. Currently, the restrictions supported are regexp matches, ranges, lengths, and restrictions to a set of values (provided as keys to a dict).

  - pyangbind.yangtypes.TypedListType - generates types which wrap a list to restrict the objects that it may contain.

  - pyangbind.yangtypes.YANGListType - generates types which wrap a class representing a container, such that it acts as a YANG list.

  - pyangbind.yangtypes.YANGBool - a boolean class.

  - pyangbind.yangtypes.YANGDynClass - generates types which consist of a wrapper (YANGDynClass) and a wrapped object which may be any other class. YANGDynClass is a meta-class that provides additional data on top of the attributes and functions of the wrapped class.

  - pyangbind.yangtypes.ReferenceType - generates types which can use a pyangbind.xpathhelper.PybindXpathHelper instance to look up values - particularly to support leafrefs in YANG.

Usage documentation for PyangBind itself can be found on GitHub: https://github.com/robshakir/pyangbind

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/robshakir/pyangbind",
    "name": "pyangbind",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "yang,pyang",
    "author": "Rob Shakir",
    "author_email": "rjs@rob.sh",
    "download_url": "https://files.pythonhosted.org/packages/d4/45/ce6a4838de6bf7340ed0a552a2c5c36768ef265fe3fd645565395abd2de5/pyangbind-0.8.5.tar.gz",
    "platform": null,
    "description": "PyangBind\n=========\n\nPyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model.\n\nThis module provides the supporting classes and functions that PyangBind modules utilise, particularly:\n\n* pyangbind.base.PybindBase - which is the parent class inherited by all container or module YANG objects.\n\n* pyangbind.pybindJSON - which containers wrapper functions which can be used to help with serialisation of YANG to JSON.\n\n* pyangbind.serialise.pybindJSONEncoder - a class that can be used as a custom encoder for the JSON module to serialise PyangBind class hierarchies to JSON.\n\n* pyangbind.serialise.pybindJSONDecoder - a class that can be used as a custom decoder to load JSON-encoded instances of YANG models into a PyangBind class hierarchy.\n\n* pyangbind.xpathhelper.YANGPathHelper - a class which can have objects registered against it, and subsequently retrieved from it using XPATH expressions. This module also includes parent classes that can be used to implement other helper modules of this nature.\n\n* pyangbind.yangtypes: The various functions which generate python types that are used to represent YANG types, and some helper methods.\n\n  - pyangbind.yangtypes.is_yang_list and is_yang_leaflist are self explainatory, but may be useful.\n\n  - pyangbind.yangtypes.safe_name is used throughout PyangBind to determine how to map YANG element names into Python attribute names safely.\n\n  - pyangbind.yangtypes.RestrictedPrecisionDecimalType - generates wrapped Decimal types that has a restricted set of decimal digits - i.e., can deal with fraction-digits arguments in YANG.\n\n  - pyangbind.yangtypes.RestrictedClassType - generates types which wrap a 'base' type (e.g., integer) with particular restrictions. The restrictions are supplied as a dictionary, or with specific arguments if single restrictions are required. Currently, the restrictions supported are regexp matches, ranges, lengths, and restrictions to a set of values (provided as keys to a dict).\n\n  - pyangbind.yangtypes.TypedListType - generates types which wrap a list to restrict the objects that it may contain.\n\n  - pyangbind.yangtypes.YANGListType - generates types which wrap a class representing a container, such that it acts as a YANG list.\n\n  - pyangbind.yangtypes.YANGBool - a boolean class.\n\n  - pyangbind.yangtypes.YANGDynClass - generates types which consist of a wrapper (YANGDynClass) and a wrapped object which may be any other class. YANGDynClass is a meta-class that provides additional data on top of the attributes and functions of the wrapped class.\n\n  - pyangbind.yangtypes.ReferenceType - generates types which can use a pyangbind.xpathhelper.PybindXpathHelper instance to look up values - particularly to support leafrefs in YANG.\n\nUsage documentation for PyangBind itself can be found on GitHub: https://github.com/robshakir/pyangbind\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "PyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model.",
    "version": "0.8.5",
    "project_urls": {
        "Homepage": "https://github.com/robshakir/pyangbind"
    },
    "split_keywords": [
        "yang",
        "pyang"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0de4b6c7c156e23b4682452e0593bd48110ec373c95151e87e5482f6a79252af",
                "md5": "3e34fe20ca1a5910e5d61c9074b0a3d8",
                "sha256": "a9a64c23b356886e434b06aeb3ba9dfeb09b1882a2e837808e5cd32a884d1c64"
            },
            "downloads": -1,
            "filename": "pyangbind-0.8.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3e34fe20ca1a5910e5d61c9074b0a3d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 52864,
            "upload_time": "2024-02-29T09:51:18",
            "upload_time_iso_8601": "2024-02-29T09:51:18.706511Z",
            "url": "https://files.pythonhosted.org/packages/0d/e4/b6c7c156e23b4682452e0593bd48110ec373c95151e87e5482f6a79252af/pyangbind-0.8.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d445ce6a4838de6bf7340ed0a552a2c5c36768ef265fe3fd645565395abd2de5",
                "md5": "8ac2b9be252c13d6e11606ba37e2a3ff",
                "sha256": "8a45e93ef99ccbc1be51166dd4266690186d6b84385daa92d0c223751058e76c"
            },
            "downloads": -1,
            "filename": "pyangbind-0.8.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8ac2b9be252c13d6e11606ba37e2a3ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 55207,
            "upload_time": "2024-02-29T09:51:20",
            "upload_time_iso_8601": "2024-02-29T09:51:20.024819Z",
            "url": "https://files.pythonhosted.org/packages/d4/45/ce6a4838de6bf7340ed0a552a2c5c36768ef265fe3fd645565395abd2de5/pyangbind-0.8.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 09:51:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "robshakir",
    "github_project": "pyangbind",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "pyang",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": []
        },
        {
            "name": "regex",
            "specs": []
        },
        {
            "name": "six",
            "specs": []
        },
        {
            "name": "enum34",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "pyangbind"
}
        
Elapsed time: 0.25152s