Repolode
qlustered

qlustered/deepdiff

Python library for deep comparison of nested objects, searching within them, content-based hashing, and storing/applying differences as deltas.

Stars
2,537
Forks
296
Open issues
125
Last commit
last month

What is it?

DeepDiff is a Python library for finding differences between nested data structures such as dictionaries, lists, sets, strings, and arbitrary objects. It reports what was added, removed, or changed, along with the path to each change, so developers can inspect exactly where two objects diverge.

Beyond diffing, the package includes DeepSearch for locating values inside nested objects, DeepHash for producing a hash based on an object's contents, and Delta for storing differences and applying them to other objects to reconstruct results. It also provides Extract for reading an item from a nested object by its path, and a command-line interface installed through an optional extra.

The library supports Python 3.10 and newer as well as PyPy3. Optional dependencies such as PyYAML, tomli, orjson, and pydantic add support for additional formats and faster serialization. Recent versions added multiprocessing for diffing and wildcard patterns for exclude_paths and include_paths.

Key features

  • 01Reports added, removed, and changed items with their paths in nested data.
  • 02Searches for values inside arbitrary nested Python objects with DeepSearch.
  • 03Generates content-based hashes for any Python object with DeepHash.
  • 04Stores differences as Delta objects and applies them to reconstruct objects.
  • 05Supports wildcard patterns for exclude_paths and include_paths.

Use cases

  • Writing tests that assert two complex API responses or config objects match.
  • Detecting changes between versions of nested JSON or YAML data.
  • Tracking and replaying incremental updates to structured state.
  • Deduplicating objects by content hash.

Topics

FAQ

What is deepdiff?
Python library for deep comparison of nested objects, searching within them, content-based hashing, and storing/applying differences as deltas. DeepDiff is a Python library for finding differences between nested data structures such as dictionaries, lists, sets, strings, and arbitrary objects. It reports what was added, removed, or changed, along with the path to each change, so developers can inspect exactly where two objects diverge.
Is deepdiff free to use? What license does it have?
deepdiff is open source under the Other license. Check the license terms before using it in commercial products.
Is deepdiff still maintained?
Updated within 6 months. The last commit to deepdiff was on Sep 18, 2026.
What can I use deepdiff for?
Writing tests that assert two complex API responses or config objects match. Detecting changes between versions of nested JSON or YAML data. Tracking and replaying incremental updates to structured state. Deduplicating objects by content hash.
Where can I get deepdiff?
The source code and installation instructions are on GitHub: https://github.com/qlustered/deepdiff

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects