Deep Difference and Search of any Python object/data. Recreate objects by adding adding deltas to each other.
Project description
DeepDiff v 9.0.0
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-0-0
- migration note:
to_dict()andto_json()now accept averbose_levelparameter and always return a usable text-view dict. When the original view is'tree', they default toverbose_level=2for full detail. The oldview_overrideparameter is removed. To get the previous results, you will need to pass the explicit verbose_level toto_jsonandto_dictif you are using the tree view.
- Dropping support for Python 3.9
- Support for python 3.14
- Added support for callable
group_bythanks to @echan5 - Added
FlatDeltaDictTypedDict forto_flat_dictsreturn type - Fixed colored view display when all list items are removed thanks to @yannrouillard
- Fixed
hasattr()swallowingAttributeErrorin__slots__handling for objects with__getattr__thanks to @tpvasconcelos - Fixed
ignore_order=Truemissing int-vs-float type changes - Always use t1 path for reporting thanks to @devin13cox
- Fixed
_convert_oversized_intsfailing on NamedTuples - Fixed orjson
TypeErrorfor integers exceeding 64-bit range - Fixed parameter bug in
to_flat_dictswhereinclude_action_in_pathandreport_type_changeswere not being passed through - Fixed
ignore_keysissue indetailed__dict__thanks to @vitalis89 - Fixed logarithmic similarity type hint thanks to @ljames8
- Added
Fractionnumeric support thanks to @akshat62
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:
- yaml
- tomli (python 3.10 and older) and tomli-w for writing
- clevercsv for more robust CSV parsing
- orjson for speed and memory optimized parsing
- pydantic
Documentation
https://zepworks.com/deepdiff/current/
ChangeLog
Please take a look at the CHANGELOG file.
Survey
:mega: Please fill out our fast 5-question survey so that we can learn how & why you use DeepDiff, and what improvements we should make. Thank you! :dancers:
Local dev
-
Clone the repo
-
Switch to the dev branch
-
Create your own branch
-
Install dependencies
- Method 1: Use
uvto install the dependencies:uv sync --all-extras. - Method 2: Use pip:
pip install -e ".[cli,coverage,dev,docs,static,test]"
- Method 1: Use
-
Build
uv build
Contribute
- Please make your PR against the dev branch
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepdiff-9.0.0.tar.gz.
File metadata
- Download URL: deepdiff-9.0.0.tar.gz
- Upload date:
- Size: 152.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4872005306237b5b50829803feff58a1dfd20b2b357a55de22e7ded65b2008a7
|
|
| MD5 |
02e05a8e8cff968641f4c7f2c5e5de5c
|
|
| BLAKE2b-256 |
242063dd34163ed07393968128dc8c7ab948c96e47c4ce76976ea533de64909d
|
File details
Details for the file deepdiff-9.0.0-py3-none-any.whl.
File metadata
- Download URL: deepdiff-9.0.0-py3-none-any.whl
- Upload date:
- Size: 170.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1ae0dd86290d86a03de5fbee728fde43095c1472ae4974bdab23ab4656305bd
|
|
| MD5 |
148843ed461dac346106c02529d3c065
|
|
| BLAKE2b-256 |
dcc4da7089cd7aa4ab554f56e18a7fb08dcfed8fd2ae91fa528f5b1be207a148
|