Overview
DiffSync is a utility library that can be used to compare and synchronize different datasets.
For example, it can be used to compare a list of devices from 2 inventory systems and, if required, synchronize them in either direction.
A = DiffSyncSystemA()
B = DiffSyncSystemB()
A.load()
B.load()
# Show the difference between both systems, that is, what would change if we applied changes from System B to System A
diff_a_b = A.diff_from(B)
print(diff_a_b.str())
# Update System A to align with the current status of system B
A.sync_from(B)
# Update System B to align with the current status of system A
A.sync_to(B)
You may wish to peruse the
diffsyncGitHub topic for examples of projects using this library.