datadiff
DataDiff is a library to provide human-readable diffs of python data structures.
What it is and what it does
DataDiff is a utility library that compares Python data structures and outputs the differences in a unified diff format, similar to what you'd see comparing text files. It recursively diffs dictionaries and sequences, and has special handling for multi-line strings. The library also provides drop-in replacements for test assertions (like `assert_equal`) that display a data diff when the assertion fails, making it easier to spot what actually differs in complex nested structures during test failures.
The package has no runtime dependencies and installs cleanly. However, it has been abandoned with no active maintenance, so it should be considered stable but not actively developed. It was originally designed to support Python 2.6 through Python 3, though current compatibility with recent Python versions is untested.
Use it for:
- Debugging test failures by displaying a clear diff of expected vs. actual data structures in assertions
- Comparing complex nested dictionaries or lists to quickly identify which fields or elements changed
- Generating human-readable output when validating API responses or configuration objects in tests
- Inspecting differences in large data structures without manually walking through nested levels
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates human-readable diffs of Python data structures (dicts, lists, tuples, sets, strings) and provides drop-in assertion replacements for test frameworks.
Yes, if you need readable diffs for test debugging and don't require active maintenance. The package is stable, has no dependencies, and works for its stated purpose. However, avoid it if you need ongoing support or compatibility assurance with current Python versions.
Install
datadiff on PyPI
pip
pip install datadiffuv
uv add datadiffpoetry
poetry add datadiffInstalling datadiff
Before you install
Low install friction with no runtime dependencies. Package is abandoned (last release 1083 days ago, status marked abandoned), so no active maintenance or bug fixes should be expected.
License in practice
Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute freely with minimal restrictions.
Quickstart
pip install datadiff
from datadiff import diff
a = {'foo': 1, 'bar': 2}
b = {'foo': 1, 'bar': 4}
print(diff(a, b))
Verify before relying
- Whether the package works reliably on modern Python versions given its abandoned status
- Whether there are known compatibility issues with current testing frameworks or data structures
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,083 days since the last release |
| First released | |
| Downloads | 101,179/month — #12,957 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: datadiff-2.2.0-py2.py3-none-any.whl
Keywords: data, diff
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dictdifferDictdiffer computes and applies diffs and…
permissive · top 5,000 on PyPI
xmldiffxmldiff compares two XML files or trees and…
permissive · top 15,000 on PyPI
mungeMunge is a data manipulation library and…
permissive · top 15,000 on PyPI
recursive-diffRecursively compares two Python data structures…
permissive · top 15,000 on PyPI
fast-diff-match-patchWraps the C++ implementation of…
permissive · top 15,000 on PyPI
deepdiff6DeepDiff recursively compares two Python…
permissive · top 15,000 on PyPI
json-deltaComputes and applies diffs/patches between JSON…
permissive · top 15,000 on PyPI
pytest-icdiffA pytest plugin that replaces default assertion…
permissive · top 5,000 on PyPI
json-diffCompares two JSON files and generates a JSON…
permissive · top 15,000 on PyPI
csv-diffCompares two CSV, TSV, or JSON files and…
permissive · top 15,000 on PyPI