Registry / data / deepdiff

deepdiff

JSON →
library9.1.0pypiunverified

DeepDiff is a powerful Python library for finding the deep difference between nearly any two Python objects, including dictionaries, lists, sets, and custom objects. It provides detailed, human-readable, and machine-readable output in various formats like JSON and YAML. The current stable PyPI version is 6.2.0, with active development and frequent releases, including major version 9.0.0 available on GitHub.

pip install deepdiff
INSTALL
IMPORT
SIG · DEEPDIFF
D
deepdiff
dataenv9.1.0
Install
1.9s avg
Import
231ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.935 runs
installs and imports cleanly · install 0.0s · import 0.256s · 21.8MB
glibc
py 3.103.935 runs
installs and imports cleanly · install 1.9s · import 0.205s · 23MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DeepDiff
from deepdiff import DeepDiff
Delta
from deepdiff import Delta

Demonstrates a basic deep difference between two dictionaries. The output will show added, removed, and changed items.

from deepdiff import DeepDiff dict1 = {'a': 1, 'b': 2, 'c': {'d': 4, 'e': 5}} dict2 = {'a': 1, 'b': 3, 'c': {'d': 4, 'f': 6}} diff = DeepDiff(dict1, dict2) print(diff)
Debug
Known issues
breakingVersion 9.0.0 introduces breaking changes to `to_dict()` and `to_json()` methods. The `view_override` parameter is removed, replaced by `verbose_level`. Additionally, Python 3.9 support has been dropped.
fix
Review calls to `to_dict()` and `to_json()`, remove `view_override` and pass `verbose_level` explicitly if needed. Ensure Python environment is 3.10+.
affects: >=9.0.0
breakingVersion 8.0.0 changed the default behavior of `threshold_to_diff_deeper`, which might alter diff results for complex nested objects. Previously, a value of 0 was default. Now, it defaults to a non-zero value, leading to different comparison depth.
fix
If older behavior is desired, explicitly set `threshold_to_diff_deeper=0` when initializing `DeepDiff`.
affects: >=8.0.0
gotchaVersions of DeepDiff prior to 8.6.1 were vulnerable to a security issue (CVE-2025-58367) in the `Delta` class, which could lead to Denial of Service and Remote Code Execution via insecure Pickle deserialization.
fix
Immediately upgrade to DeepDiff 8.6.1 or later to patch the vulnerability.
affects: <8.6.1
gotchaWhen comparing collections with `ignore_order=True` (e.g., sets of dictionaries or lists), items must be hashable. If items are unhashable (e.g., lists), DeepDiff may raise a `TypeError`.
fix
Ensure all items within collections compared with `ignore_order=True` are hashable. Use `DeepDiff(..., ignore_order=True, iterable_compare_func=lambda x: str(x))` or provide a custom comparison function for complex unhashable objects.
affects: all
Errors
Common errors & fixes
TypeError: unhashable type: 'list'
Attempting to compare sets or dictionaries with `ignore_order=True` where keys or set members are unhashable types like lists.
fix
Convert unhashable types to hashable equivalents (e.g., tuples from lists) before comparison, or provide a custom `iterable_compare_func` or `set_item_diff_func` that can handle the unhashable items.
RecursionError: maximum recursion depth exceeded in comparison of two objects
Comparing deeply nested Python objects, exceeding Python's default recursion limit (often 1000).
fix
Increase Python's recursion limit for the current scope using `sys.setrecursionlimit(new_limit)` (use with caution), or restructure your data to reduce nesting where possible.
KeyError: 'type'
This can occur when attempting to diff specific Python objects that DeepDiff doesn't inherently understand or when the `exclude_types` or `include_types` parameters are misused.
fix
Ensure that the objects being compared are standard Python types or well-defined custom objects. If using `exclude_types` or `include_types`, verify that the specified types are correct and accessible.
Upgrade
Version history
9.1.0latest on PyPI · released May 15, 2026
Audit
Dependencies
ordered-setrequiredRequired for maintaining order in sets during comparison.
orderly-setrequiredRequired for maintaining order in sets during comparison.
Agent activity
21 hits · last 30 days
node
20
Amazon
1
Resources

No resource links recorded.

deepdiff — pip install deepdiff · libregistry