Declarative data diff engine for tables, powered by Polars. Output Excel, HTML, or Typst PDF.
Project description
diffino
Declarative data diff engine for tables, powered by Polars. Compare Excel, CSV, or Parquet files and generate detailed reports with character-level inline diffs.
Installation
pip install diffino-cli
Quick Start
- Prepare a config file:
sources:
left:
type: excel
path: data/left.xlsx
right:
type: excel
path: data/right.xlsx
compare:
- left_sheet: Sheet1
key_columns:
- ID
ignore_columns:
- Notes
output:
formats:
- excel
- html
- Run diffino:
diffino run config.yaml
- View the generated reports.
Features
- Multi-format sources: Excel, CSV, Parquet (DuckDB planned)
- Key-based or fingerprint matching: Compare by composite keys or full-row hashes
- Column preprocessing: Decimal rounding, text normalization, case sensitivity control
- Character-level inline diff: Precise word-level change highlighting — red strikethrough for deleted text, green for inserted text
- Three output formats:
- Excel: Side-by-side old/new rows, yellow-highlighted changed cells with rich-text inline diffs (
[-deleted-],[+inserted+]) - HTML: Self-contained report with
<del>/<ins>tags and JS filtering - Typst: Colored table report with character-level inline diffs — green for additions, red strikethrough for deletions, yellow for modified cells. Uses Zhuque Fangsong CJK font. Auto-escapes special characters and normalizes CJK punctuation for reliable compilation and text wrapping.
- Excel: Side-by-side old/new rows, yellow-highlighted changed cells with rich-text inline diffs (
- Excel styles:
track: old data baseline with changes overlaid inline — like Word track changesfinal: new values with yellow highlights on changed cellsside_by_side: old row (red) + new row (green) for visual comparison
- Change log sheet: Summary of all changes in a dedicated sheet
CLI Commands
diffino run config.yaml # Run comparison
diffino validate config.yaml # Validate config only
Configuration Reference
See config.example.yaml for a complete example. Key options:
| Section | Field | Description |
|---|---|---|
sources |
left / right |
File type (excel, csv, parquet) and path |
compare[] |
left_sheet |
Sheet name in left file |
compare[] |
right_sheet |
Sheet name in right file (defaults to left_sheet) |
compare[] |
key_columns |
Column names used for row matching |
compare[] |
fingerprint |
Use full-row hash instead of key columns |
compare[] |
ignore_columns |
Columns to exclude from comparison |
compare[] |
column_rules |
Preprocessing rules (decimal, text) |
output |
formats |
List of excel, html, typst |
output.excel |
style |
final or side_by_side |
License
MIT
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 diffino_cli-0.2.5.tar.gz.
File metadata
- Download URL: diffino_cli-0.2.5.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2282986312592b321a7bea66b2532d0a4ef65902bdfdeb073fe89f83287c79d4
|
|
| MD5 |
afe3d1cb8642d052280b07787eee0c98
|
|
| BLAKE2b-256 |
e64b178535c0b7ff8db1e8623241c5886f66a4f362f6a60fd6e7063ab4ebc212
|
File details
Details for the file diffino_cli-0.2.5-py3-none-any.whl.
File metadata
- Download URL: diffino_cli-0.2.5-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a059a66f6a4837bb78625098ae636bc999e2f922773c902bebbd1acf1c62dd5a
|
|
| MD5 |
a7cecc6b71a0951de65b853c239ac089
|
|
| BLAKE2b-256 |
3064259969ae5abc9344c0c462e5a21e49570241812e37d66fa940c17070927e
|