jdiff


Namejdiff JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/networktocode/jdiff
SummaryA light-weight library to compare structured output from network devices show commands.
upload_time2024-01-24 10:19:57
maintainer
docs_urlNone
authorNetwork to Code, LLC
requires_python>=3.8,<4.0
licenseApache-2.0
keywords json diff network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jdiff

`jdiff` is a lightweight Python library allowing you to examine structured data. `jdiff` provides an interface to intelligently compare--via key presense/absense and value comparison--JSON data objects

Our primary use case is the examination of structured data returned from networking devices, such as:

* Compare the operational state of network devices pre and post change
* Compare operational state of a device vs a "known healthy" state
* Compare state of similar devices, such as a pair of leafs or a pair of backbone routers
* Compare operational state of a component (interface, vrf, bgp peering, etc.) migrated from one device to another

However, the library fits other use cases where structured data needs to be operated on.

## Installation 

Install from PyPI:

```
pip install jdiff
```

## Intelligent Comparison

The library provides the ability to ask more intelligent questions of a given data structure. Comparisons of data such as "Is my pre change state the same as my post change state", is not that interesting of a comparison. The library intends to ask intelligent questions _like_:

* Is the route table within 10% of routes before and after a change?
* Is all of the interfaces that were up before the change, still up?
* Are there at least 10k sessions of traffic on my firewall?
* Is there there at least 2 interfaces up within lldp neighbors?

## Technical Overview

The library heavily relies on [JMESPath](https://jmespath.org/) for traversing the JSON object and finding the values to be evaluated. More on that [here](#customized-jmespath).

`jdiff` has been developed around diffing and testing structured data returned from Network APIs and libraries (such as TextFSM) but is equally useful when working or dealing with data returned from APIs.

## Documentation

Documentation is hosted on Read the Docs at [jdiff Documentation](https://jdiff.readthedocs.io/).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/networktocode/jdiff",
    "name": "jdiff",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "json,diff,network",
    "author": "Network to Code, LLC",
    "author_email": "info@networktocode.com",
    "download_url": "https://files.pythonhosted.org/packages/69/2b/de8142a08f08d2d2128e003b8603322d1d16faf31442a1fb9d393de95960/jdiff-0.0.6.tar.gz",
    "platform": null,
    "description": "# jdiff\n\n`jdiff` is a lightweight Python library allowing you to examine structured data. `jdiff` provides an interface to intelligently compare--via key presense/absense and value comparison--JSON data objects\n\nOur primary use case is the examination of structured data returned from networking devices, such as:\n\n* Compare the operational state of network devices pre and post change\n* Compare operational state of a device vs a \"known healthy\" state\n* Compare state of similar devices, such as a pair of leafs or a pair of backbone routers\n* Compare operational state of a component (interface, vrf, bgp peering, etc.) migrated from one device to another\n\nHowever, the library fits other use cases where structured data needs to be operated on.\n\n## Installation \n\nInstall from PyPI:\n\n```\npip install jdiff\n```\n\n## Intelligent Comparison\n\nThe library provides the ability to ask more intelligent questions of a given data structure. Comparisons of data such as \"Is my pre change state the same as my post change state\", is not that interesting of a comparison. The library intends to ask intelligent questions _like_:\n\n* Is the route table within 10% of routes before and after a change?\n* Is all of the interfaces that were up before the change, still up?\n* Are there at least 10k sessions of traffic on my firewall?\n* Is there there at least 2 interfaces up within lldp neighbors?\n\n## Technical Overview\n\nThe library heavily relies on [JMESPath](https://jmespath.org/) for traversing the JSON object and finding the values to be evaluated. More on that [here](#customized-jmespath).\n\n`jdiff` has been developed around diffing and testing structured data returned from Network APIs and libraries (such as TextFSM) but is equally useful when working or dealing with data returned from APIs.\n\n## Documentation\n\nDocumentation is hosted on Read the Docs at [jdiff Documentation](https://jdiff.readthedocs.io/).\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A light-weight library to compare structured output from network devices show commands.",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/networktocode/jdiff",
        "Repository": "https://github.com/networktocode/jdiff"
    },
    "split_keywords": [
        "json",
        "diff",
        "network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd23f24343333edda714d11de002d60c2dd4635868349e3daeb1402ba601b1b1",
                "md5": "c41009915461996e22827f0d5193d478",
                "sha256": "346798820be11ae2485ce2a29eb9a9cc0ddaa23388319566d367be18730cbaa8"
            },
            "downloads": -1,
            "filename": "jdiff-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c41009915461996e22827f0d5193d478",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 23310,
            "upload_time": "2024-01-24T10:19:55",
            "upload_time_iso_8601": "2024-01-24T10:19:55.992330Z",
            "url": "https://files.pythonhosted.org/packages/cd/23/f24343333edda714d11de002d60c2dd4635868349e3daeb1402ba601b1b1/jdiff-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "692bde8142a08f08d2d2128e003b8603322d1d16faf31442a1fb9d393de95960",
                "md5": "735d8095672a6b2a9ace33e8c9022fc7",
                "sha256": "b42d26947d24fe7c297c8e3d38709b6e78823a41dcf50417d6be916d7d49be45"
            },
            "downloads": -1,
            "filename": "jdiff-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "735d8095672a6b2a9ace33e8c9022fc7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 17906,
            "upload_time": "2024-01-24T10:19:57",
            "upload_time_iso_8601": "2024-01-24T10:19:57.256564Z",
            "url": "https://files.pythonhosted.org/packages/69/2b/de8142a08f08d2d2128e003b8603322d1d16faf31442a1fb9d393de95960/jdiff-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-24 10:19:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "networktocode",
    "github_project": "jdiff",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "jdiff"
}
        
Elapsed time: 0.17366s