Skip to content

Commit e9676bc

Browse files
itdependsnetworkspszulczewskiscetron
authoredSep 22, 2022
Update readme to start with use cases (#84)
* Update readme to start with use cases * Apply suggestions from code review Co-authored-by: Patryk Szulczewski <[email protected]> Co-authored-by: Stephen Corry <[email protected]> * Update README.md Co-authored-by: Patryk Szulczewski <[email protected]> Co-authored-by: Stephen Corry <[email protected]>
1 parent 43467af commit e9676bc

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed
 

‎README.md

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# jdiff
22

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
44

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.
613

714
## Installation
815

@@ -12,9 +19,20 @@ Install from PyPI:
1219
pip install jdiff
1320
```
1421

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).
1634

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.
1836

1937
## Documentation
2038

0 commit comments

Comments
 (0)