ランキングに戻る

qlustered/deepdiff

Pythonzepworks.com/deepdiff

DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.

pythontreedeep-searchrepetitiondifferencecomparisonreport-repetitionnestedrecursivediffdeltadistance
スター成長
スター
2.5k
フォーク
274
週間成長
Issue
99
1k2k
2014年10月2018年9月2022年8月2026年7月
成果物PyPIpip install deepdiff
README

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.

関連リポジトリ
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

PythonPyPIOtherprogrammingdevelopment
358.5k57.3k
vinta/awesome-python

An opinionated list of Python frameworks, libraries, tools, and resources

PythonPyPIOtherawesomepython
awesome-python.com
309.4k28.4k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPIMIT Licensetutorialproject
274.4k35.4k
TheAlgorithms/Python

All Algorithms implemented in Python

PythonPyPIMIT Licensepythonalgorithm
thealgorithms.github.io/Python/
223k50.9k
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

C++Apache License 2.0tensorflowmachine-learning
tensorflow.org
196.4k75.6k
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

algorithmleetcode
cyc2018.xyz
184.8k50.8k
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

PythonPyPIThe Unlicenseyoutube-dlpython
discord.gg/H5MNcFW63r
179.2k15.2k
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

PythonPyPIgithubhellogithub
hellogithub.com
166.3k12.4k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
162.8k34k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.5k23.6k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.2k23.6k