--- id: csv-diff version: "1.2" license: Apache License, Version 2.0 license_treatment: permissive maintenance: dormant --- # csv-diff — Python CLI tool and library for diffing CSV and JSON files License: permissive · Maintenance: dormant · Downloads: 219.0K/mo ## What it is and what it does csv-diff is a command-line tool and Python library that identifies and reports differences between two structured data files (CSV, TSV, or JSON arrays). It treats one column as a unique key to match records across files, then reports which rows were added, removed, or changed, and which specific fields changed within each row. You can use it as a CLI tool to get a human-readable summary or JSON output, or import its functions into your own Python code to programmatically compare datasets. It automatically detects delimiter format (comma or tab) and can augment the output with templated extras like URLs. The package is lightweight, depending only on click and dictdiffer. Use it for: - Track changes to a public dataset over time and generate a commit log of what changed between versions - Audit data migrations by comparing source and target CSV exports to verify all records were moved correctly - Monitor configuration or inventory files in version control by diffing snapshots to see what was added, removed, or modified - Validate ETL pipelines by comparing expected and actual output files row-by-row - Generate reports on data quality issues by comparing two versions of a dataset and highlighting specific field changes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Compares two CSV, TSV, or JSON files and reports what rows were added, removed, or changed, with output as human-readable text or machine-readable JSON. Yes, if you need to diff CSV or JSON files programmatically or from the command line. The package is stable, has no known vulnerabilities, and requires minimal dependencies. The dormant maintenance status is not a concern for a tool with a narrow, well-defined scope—it does one thing reliably and hasn't needed updates. Install it if this is your use case; skip it if you need active development or advanced diffing features. ## Install pip install csv-diff uv add csv-diff poetry add csv-diff ## Installing csv-diff Before you install: Low friction: pure Python wheel with only two runtime dependencies (click and dictdiffer). Maintenance is dormant—last release was 707 days ago—but the repo remains active and the package is stable enough for its narrow scope. License in practice: Apache License 2.0 (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install csv-diff from csv_diff import load_csv, compare diff = compare( load_csv(open("one.csv"), key="id"), load_csv(open("two.csv"), key="id") ) print(diff) Verify before relying: - Whether the package works with Python versions beyond 3.6 and 3.7 (classifiers list only those two, but requires_python is unspecified) ## Package facts - License: Apache License, Version 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 219.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags csv file diff comparison, compare two csv files, detect csv changes, csv data diffing tool, json array comparison, tsv file differences, data row changes, data-comparison, cli-tool [View on SkillFed](https://skillfed.io/packages/csv-diff) · [View on PyPI](https://pypi.org/project/csv-diff/)