daff
Diff and patch tables
Decision gist · record as of 2026-08-14
Yes. daff is a mature, actively maintained library with no dependencies, permissive licensing, and a clear use case for anyone working with versioned or compared tabular data. Install if you need to diff CSVs, track table changes, or integrate smart table diffing into git workflows. The CLI alone is useful; the library adds programmatic control.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with recent commits and stable release history since 2014-06-05.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
last release 2025-05-04 (467 days) · last repo commit 2026-05-27 · 922 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 25,050,238 downloads/mo, #908 on PyPI
Alternatives
Verify before relying
pip install daff
from daff import TableView, compareTables, CompareFlags, TableDiff
data1 = [['Name', 'Age'], ['Alice', 'val1'], ['Bob', 'val2']]
data2 = [['Name', 'Age'], ['Alice', 'val3'], ['Bob', 'val2'], ['Carol', 'val4']]
table1 = TableView(data1)
table2 = TableView(data2)
alignment = compareTables(table1, table2).align()
data_diff = []
table_diff = TableView(data_diff)
flags = CompareFlags()
highlighter = TableDiff(alignment, flags)
highlighter.hilite(table_diff)
print(data_diff)- Whether the Python implementation supports all output formats (CSV, TSV, JSON, HTML, SQLite) mentioned in the CLI documentation
- Performance characteristics when diffing large tables or handling many columns
- Whether Python bindings expose the full 3-way merge capability described in the library documentation
What it is and what it does
daff is a library for computing and applying diffs on tabular data—CSV files, databases, or in-memory tables. It aligns rows and columns across two versions of a table, detects insertions, deletions, updates, and schema changes, and represents the diff in a standardized format that can be rendered as HTML, CSV, or JSON, or applied back as a patch. The library is written in Haxe and compiled to Python; it exposes a table interface so you work with your own data structures rather than forcing conversions.
You can use daff as a command-line tool to diff and merge CSV or SQLite files, or as a library to compute diffs programmatically. It's particularly useful when you need to track changes to structured data over time, understand what changed between versions, or apply those changes to another copy of the table. The library handles row reordering, column additions, and multi-way merges comparing two versions against a common ancestor.
Use it for
- Generate human-readable diffs of CSV files and render them as HTML for code review or audit trails
- Use daff as a git diff/merge driver to make version control understand row and column changes instead of line-by-line diffs
- Apply tabular patches programmatically to synchronize data between systems or recover from accidental changes
- Detect schema and data changes in database exports or data snapshots for data validation workflows
- Implement 3-way merges for collaborative editing of tabular data with conflict detection
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
daff is a mature, actively maintained library with no dependencies, permissive licensing, and a clear use case for anyone working with versioned or compared tabular data. Install if you need to diff CSVs, track table changes, or integrate smart table diffing into git workflows. The CLI alone is useful; the library adds programmatic control.
Install
daff on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with recent commits and stable release history since 2014-06-05.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install daff
from daff import TableView, compareTables, CompareFlags, TableDiff
data1 = [['Name', 'Age'], ['Alice', 'val1'], ['Bob', 'val2']]
data2 = [['Name', 'Age'], ['Alice', 'val3'], ['Bob', 'val2'], ['Carol', 'val4']]
table1 = TableView(data1)
table2 = TableView(data2)
alignment = compareTables(table1, table2).align()
data_diff = []
table_diff = TableView(data_diff)
flags = CompareFlags()
highlighter = TableDiff(alignment, flags)
highlighter.hilite(table_diff)
print(data_diff)
Verify before relying
- Whether the Python implementation supports all output formats (CSV, TSV, JSON, HTML, SQLite) mentioned in the CLI documentation
- Performance characteristics when diffing large tables or handling many columns
- Whether Python bindings expose the full 3-way merge capability described in the library documentation
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 467 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 25,050,238 / month, #908 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaLicense :: OSI Approved :: MIT LicenseTopic :: Utilities |
Evidence: daff-1.4.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “table diff and patch”
- daffCompares two tables and produces a diff summary that can be used as a…
- patchParses and applies unified diff patches to files, with automatic…
- patch-ngParses and applies unified diff patches to files, with automatic…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also csv-diff · diff-match-patch · collate-data-diff · sqlalchemy-diff · bsdiff4 · dictdiffer · patch · icdiff · fast-diff-match-patch · pycobertura