deepdiff6
Deep Difference and Search of any Python object/data. Recreate objects by adding adding deltas to each other.
What it is and what it does
DeepDiff is a library for detecting structural differences between Python objects at any depth. It recursively traverses dictionaries, lists, and other iterables to report all changes—additions, removals, and value modifications—with detailed path information. The package includes two companion tools: DeepSearch for locating objects within nested structures, and DeepHash for generating content-based hashes of arbitrary Python objects.
The library is commonly used in testing, data validation, configuration comparison, and debugging. It supports flexible comparison modes (ignoring order, excluding types or paths, using regex patterns, handling floating-point precision) and offers both text and tree views of results. A command-line interface is available via the [cli] extra, exposing diff, patch, grep, and extract commands.
Use it for:
- Unit testing: assert that two complex data structures are identical or detect specific changes between versions
- Configuration validation: compare expected vs. actual configuration objects to identify mismatches
- API response testing: verify that JSON responses match expected schemas, ignoring order when appropriate
- Data migration auditing: track what changed when transforming or updating nested data structures
- Debugging: quickly identify which fields or nested values differ between two object states
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
DeepDiff recursively compares two Python objects—dictionaries, lists, strings, and other types—to identify all differences, and provides companion tools for searching within objects and hashing based on content.
Yes. DeepDiff is a mature, well-maintained library (active status, recent commits, 2520 stars) with permissive MIT licensing, low install friction, and no known vulnerabilities. It solves a common problem—deep object comparison—with a flexible API and multiple output views. Suitable for testing, validation, and debugging workflows.
Install
deepdiff6 on PyPI
pip
pip install deepdiff6uv
uv add deepdiff6poetry
poetry add deepdiff6Installing deepdiff6
Before you install
Low install friction; single runtime dependency (ordered-set). Active maintenance with recent commits and 2520 repository stars. Tested on Python 3.7+ and PyPy3.
License in practice
MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install deepdiff6
from deepdiff import DeepDiff
t1 = {1: 1, 2: 2, 3: 3}
t2 = {1: 1, 2: 4, 3: 3}
ddiff = DeepDiff(t1, t2)
print(ddiff)
Verify before relying
- Whether the package is still published under 'deepdiff6' on PyPI or has reverted to 'deepdiff' name post-v6
- Current status of the CLI extras (deepdiff6[cli]) and whether all documented commands are functional
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — ordered-set |
| Maintenance | actively maintained — 1,440 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 278,165/month — #8,135 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: deepdiff6-6.2.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
deepdiffDeepDiff compares dictionaries, iterables,…
permissive · top 1,000 on PyPI
recursive-diffRecursively compares two Python data structures…
permissive · top 15,000 on PyPI
dirsyncSynchronizes, updates, or reports differences…
permissive · top 15,000 on PyPI
dictdifferDictdiffer computes and applies diffs and…
permissive · top 5,000 on PyPI
datadiffGenerates human-readable diffs of Python data…
permissive · top 15,000 on PyPI
jsoncomparisonCompares two JSON-like objects and returns a…
permissive · top 5,000 on PyPI
pytest-deepassertA pytest plugin that replaces standard…
permissive · top 15,000 on PyPI
hydratersMerges nested Python dictionaries efficiently…
unclear · top 15,000 on PyPI
jsondiffComputes structured diffs between JSON and…
permissive · top 5,000 on PyPI
json-diffCompares two JSON files and generates a JSON…
permissive · top 15,000 on PyPI