| 1 |
# DeepDiff v 9.0.0 |
| 2 |
|
| 3 |
 |
| 4 |
 |
| 5 |
 |
| 6 |
[](https://github.com/seperman/deepdiff/actions) |
| 7 |
[](https://codecov.io/gh/seperman/deepdiff) |
| 8 |
|
| 9 |
**DeepDiff is now part of [Qluster](/qluster).** |
| 10 |
|
| 11 |
*If you're building workflows around data validation and correction, [Qluster](/qluster) gives your team a structured way to manage rules, review failures, approve fixes, and reuse decisions—without building the entire system from scratch.* |
| 12 |
|
| 13 |
## Modules |
| 14 |
|
| 15 |
- [DeepDiff](https://zepworks.com/deepdiff/current/diff.html): Deep Difference of dictionaries, iterables, strings, and ANY other object. |
| 16 |
- [DeepSearch](https://zepworks.com/deepdiff/current/dsearch.html): Search for objects within other objects. |
| 17 |
- [DeepHash](https://zepworks.com/deepdiff/current/deephash.html): Hash any object based on their content. |
| 18 |
- [Delta](https://zepworks.com/deepdiff/current/delta.html): Store the difference of objects and apply them to other objects. |
| 19 |
- [Extract](https://zepworks.com/deepdiff/current/extract.html): Extract an item from a nested Python object using its path. |
| 20 |
- [commandline](https://zepworks.com/deepdiff/current/commandline.html): Use DeepDiff from commandline. |
| 21 |
|
| 22 |
Tested on Python 3.10+ and PyPy3. |
| 23 |
|
| 24 |
- **[Documentation](https://zepworks.com/deepdiff/9.0.0/)** |
| 25 |
|
| 26 |
## What is new? |
| 27 |
|
| 28 |
Please check the [ChangeLog](CHANGELOG.md) file for the detailed information. |
| 29 |
|
| 30 |
DeepDiff 9-0-0 |
| 31 |
- migration note: |
| 32 |
- `to_dict()` and `to_json()` now accept a `verbose_level` parameter and always return a usable text-view dict. When the original view is `'tree'`, they default to `verbose_level=2` for full detail. The old `view_override` parameter is removed. To get the previous results, you will need to pass the explicit verbose_level to `to_json` and `to_dict` if you are using the tree view. |
| 33 |
- Dropping support for Python 3.9 |
| 34 |
- Support for python 3.14 |
| 35 |
- Added support for callable `group_by` thanks to @echan5 |
| 36 |
- Added `FlatDeltaDict` TypedDict for `to_flat_dicts` return type |
| 37 |
- Fixed colored view display when all list items are removed thanks to @yannrouillard |
| 38 |
- Fixed `hasattr()` swallowing `AttributeError` in `__slots__` handling for objects with `__getattr__` thanks to @tpvasconcelos |
| 39 |
- Fixed `ignore_order=True` missing int-vs-float type changes |
| 40 |
- Always use t1 path for reporting thanks to @devin13cox |
| 41 |
- Fixed `_convert_oversized_ints` failing on NamedTuples |
| 42 |
- Fixed orjson `TypeError` for integers exceeding 64-bit range |
| 43 |
- Fixed parameter bug in `to_flat_dicts` where `include_action_in_path` and `report_type_changes` were not being passed through |
| 44 |
- Fixed `ignore_keys` issue in `detailed__dict__` thanks to @vitalis89 |
| 45 |
- Fixed logarithmic similarity type hint thanks to @ljames8 |
| 46 |
- Added `Fraction` numeric support thanks to @akshat62 |
| 47 |
|
| 48 |
## Installation |
| 49 |
|
| 50 |
### Install from PyPi: |
| 51 |
|
| 52 |
`pip install deepdiff` |
| 53 |
|
| 54 |
If you want to use DeepDiff from commandline: |
| 55 |
|
| 56 |
`pip install "deepdiff[cli]"` |
| 57 |
|
| 58 |
If you want to improve the performance of DeepDiff with certain functionalities such as improved json serialization: |
| 59 |
|
| 60 |
`pip install "deepdiff[optimize]"` |
| 61 |
|
| 62 |
Install optional packages: |
| 63 |
- [yaml](https://pypi.org/project/PyYAML/) |
| 64 |
- [tomli](https://pypi.org/project/tomli/) (python 3.10 and older) and [tomli-w](https://pypi.org/project/tomli-w/) for writing |
| 65 |
- [clevercsv](https://pypi.org/project/clevercsv/) for more robust CSV parsing |
| 66 |
- [orjson](https://pypi.org/project/orjson/) for speed and memory optimized parsing |
| 67 |
- [pydantic](https://pypi.org/project/pydantic/) |
| 68 |
|
| 69 |
|
| 70 |
# Documentation |
| 71 |
|
| 72 |
<https://zepworks.com/deepdiff/current/> |
| 73 |
|
| 74 |
# ChangeLog |
| 75 |
|
| 76 |
Please take a look at the [CHANGELOG](CHANGELOG.md) file. |
| 77 |
|
| 78 |
# Survey |
| 79 |
|
| 80 |
:mega: **Please fill out our [fast 5-question survey](https://forms.gle/E6qXexcgjoKnSzjB8)** so that we can learn how & why you use DeepDiff, and what improvements we should make. Thank you! :dancers: |
| 81 |
|
| 82 |
# Local dev |
| 83 |
|
| 84 |
1. Clone the repo |
| 85 |
2. Switch to the dev branch |
| 86 |
3. Create your own branch |
| 87 |
4. Install dependencies |
| 88 |
|
| 89 |
- Method 1: Use [`uv`](https://github.com/astral-sh/uv) to install the dependencies: `uv sync --all-extras`. |
| 90 |
- Method 2: Use pip: `pip install -e ".[cli,coverage,dev,docs,static,test]"` |
| 91 |
5. Build `uv build` |
| 92 |
|
| 93 |
# Contribute |
| 94 |
|
| 95 |
1. Please make your PR against the dev branch |
| 96 |
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. |
| 97 |
|
| 98 |
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. |
| 99 |
|
| 100 |
Or to see a more user friendly version, please run: `pytest --cov=deepdiff --cov-report term-missing --runslow`. |
| 101 |
|
| 102 |
Thank you! |
| 103 |
|
| 104 |
# Authors |
| 105 |
|
| 106 |
Please take a look at the [AUTHORS](AUTHORS.md) file. |