Skip to main content

DeepDiff v 9.1.0

Downloads Python Versions License Build Status codecov

DeepDiff is now part of Qluster.

If you're building workflows around data validation and correction, Qluster gives your team a structured way to manage rules, review failures, approve fixes, and reuse decisions—without building the entire system from scratch.

Modules

  • DeepDiff: Deep Difference of dictionaries, iterables, strings, and ANY other object.
  • DeepSearch: Search for objects within other objects.
  • DeepHash: Hash any object based on their content.
  • Delta: Store the difference of objects and apply them to other objects.
  • Extract: Extract an item from a nested Python object using its path.
  • commandline: Use DeepDiff from commandline.

Tested on Python 3.10+ and PyPy3.

What is new?

Please check the ChangeLog file for the detailed information.

DeepDiff 9-1-0

  • Added multiprocessing support for DeepDiff: parallel distance computation and parallel subtree diffing with aggregated worker stats, deterministic ordering, and automatic fallback to serial when unsafe (e.g. custom_operators, *_obj_callback, ignore_order_func)
  • Added wildcard/glob pattern support for exclude_paths and include_paths thanks to @akshat62
  • Reimplemented internal cache for improved performance
  • Memoized GlobPathMatcher to remove exponential-time matching cliff
  • Comprehensive type-hint corrections across deephash.py, helper.py, delta.py, diff.py, distance.py, path.py, and serialization.py (also fixed real bugs: misplaced paren in path._guess_type call, and len(other.indexes > 1)len(other.indexes) > 1 in diff._compare_in_order)
  • Security: Delta dunder-attribute traversal in check_elem() now raises immediately instead of going through _raise_or_log(), with full-path preflight validation in _get_elements_and_details() so the set_item_added path cannot silently skip malicious dunder paths
  • Fixed nested NamedTuple set/frozenset Delta updates dropping the outer container
  • Fixed tuple Deltas using iterable opcodes silently doing nothing for insert/delete-only changes
  • Fixed Delta with both moved and added iterable items mutating the Delta's own internal diff data
  • Fixed crash during path sorting when removing multiple dictionary items with complex keys
  • Packaging: added missing files to sdist and removed obsolete MANIFEST.in thanks to @mgorny
  • Updated GitHub Actions workflows and dependencies

Installation

Install from PyPi:

pip install deepdiff

If you want to use DeepDiff from commandline:

pip install "deepdiff[cli]"

If you want to improve the performance of DeepDiff with certain functionalities such as improved json serialization:

pip install "deepdiff[optimize]"

Install optional packages:

Documentation

https://zepworks.com/deepdiff/current/

ChangeLog

Please take a look at the CHANGELOG file.

Survey

:mega: Please fill out our fast 10-question survey so that we can learn how & why you use DeepDiff, and what improvements we should make. Thank you! :dancers:

Local dev

  1. Clone the repo

  2. Switch to the dev branch

  3. Create your own branch

  4. Install dependencies

    • Method 1: Use uv to install the dependencies: uv sync --all-extras.
    • Method 2: Use pip: pip install -e ".[cli,coverage,dev,docs,static,test]"
  5. Build uv build

Contribute

  1. Please make your PR against the dev branch
  2. Please make sure that your PR has tests. Since DeepDiff is used in many sensitive data driven projects, we strive to maintain around 100% test coverage on the code.

Please run pytest --cov=deepdiff --runslow to see the coverage report. Note that the --runslow flag will run some slow tests too. In most cases you only want to run the fast tests which so you won't add the --runslow flag.

Or to see a more user friendly version, please run: pytest --cov=deepdiff --cov-report term-missing --runslow.

Thank you!

Authors

Please take a look at the AUTHORS file.

Release files for deepdiff 9.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepdiff 9.1.0
File Size Uploaded
deepdiff-9.1.0.tar.gz 382.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deepdiff 9.1.0
File Interpreter ABI Platform
deepdiff-9.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 566.8 kB

Release files / deepdiff-9.1.0.tar.gz

Download URL deepdiff-9.1.0.tar.gz
Size 382.1 kB
Tags Source
SHA-256 checksum
How to use checksums
07e9e366fab4297755153c4eab795ad4ef3cbd0d51660e847f5751c6bd727687
BLAKE2b-256 checksum
How to use checksums
f96b6a4a5aaf38535eb332c2856aa08e73ed7c549d0851b1215401af0a2db1a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / deepdiff-9.1.0-py3-none-any.whl

Download URL deepdiff-9.1.0-py3-none-any.whl
Size 184.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80c0460e1993b04f6f0ca79abf25548b129fd218478c4ebb08f80560f5d10610
BLAKE2b-256 checksum
How to use checksums
c7264a2bad8eb430d8d805a4642c4bff25103a37548d74ab346f8b1e024abcc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

9.1.0 This release

2 release files

9.0.0

2 release files

8.6.2

2 release files

8.6.1

2 release files

8.6.0

2 release files

8.5.0

2 release files

8.4.2

2 release files

8.4.1

2 release files

8.4.0

2 release files

8.3.0

2 release files

8.2.0

2 release files

8.1.1

2 release files

8.1.0

2 release files

8.0.1

2 release files

8.0.0

2 release files

7.0.1

2 release files

7.0.0

2 release files

6.7.1

2 release files

6.7.0

2 release files

6.6.1

2 release files

6.6.0

2 release files

6.5.0

2 release files

6.4.1

2 release files

6.4.0

2 release files

6.3.1

2 release files

6.3.0

2 release files

6.2.3

2 release files

6.2.2

2 release files

6.2.1

2 release files

5.8.1

2 release files

5.8.0

2 release files

5.7.0

2 release files

5.6.0

2 release files

5.5.0

2 release files

5.3.0

2 release files

5.2.3

2 release files

5.2.2

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.3.2

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.0.9

2 release files

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.2

2 release files

3.3.0

3 release files

3.2.1

3 release files

3.2.0

3 release files

3.1.2

3 release files

3.1.1

3 release files

3.1.0

3 release files

3.0.0

3 release files

2.5.3

3 release files

2.5.2

3 release files

2.5.1

3 release files

2.5.0

3 release files

2.1.2

3 release files

2.1.1

3 release files

2.1.0

3 release files

2.0.0

3 release files

1.8.0

3 release files

1.7.0

3 release files

1.6.0

3 release files

1.5.0

3 release files

1.2.0

3 release files

1.1.0

3 release files

1.0.2

3 release files

1.0.1

3 release files

1.0.0

3 release files

0.6.1

3 release files

0.6.0

3 release files

0.5.9

3 release files

0.5.8

3 release files

0.5.7

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page