You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+22-4
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,15 @@
1
1
# jdiff
2
2
3
-
`jdiff` is a lightweight Python library allowing you to examine structured data. `jdiff` provides an interface to intelligently compare JSON data objects and test for the presence (or absence) of keys. You can also examine and compare corresponding key-values.
3
+
`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
4
4
5
-
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).
5
+
Our primary use case is the examination of structured data returned from networking devices, such as:
6
+
7
+
* Compare the operational state of network devices pre and post change
8
+
* Compare operational state of a device vs a "known healthy" state
9
+
* Compare state of similar devices, such as a pair of leafs or a pair of backbone routers
10
+
* Compare operational state of a component (interface, vrf, bgp peering, etc.) migrated from one device to another
11
+
12
+
However, the library fits other use cases where structured data needs to be operated on.
6
13
7
14
## Installation
8
15
@@ -12,9 +19,20 @@ Install from PyPI:
12
19
pip install jdiff
13
20
```
14
21
15
-
## Use cases
22
+
## Intelligent Comparison
23
+
24
+
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_:
25
+
26
+
* Is the route table within 10% of routes before and after a change?
27
+
* Is all of the interfaces that were up before the change, still up?
28
+
* Are there at least 10k sessions of traffic on my firewall?
29
+
* Is there there at least 2 interfaces up within lldp neighbors?
30
+
31
+
## Technical Overview
32
+
33
+
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).
16
34
17
-
`jdiff` has been developed around diffing and testing structured data returned from APIs and other Python modules and libraries (such as TextFSM). Our primary use case is the examination of structured data returned from networking devices. However, we found the library fits other use cases where structured data needs to be operated on, and is especially useful when working or dealing with data returned from APIs.
35
+
`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.
0 commit comments