diff-parser
Parse git diff data or .diff file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.
Decision gist · record as of 2026-08-14
Yes, if you need to parse diff files programmatically. The package is simple, dependency-free, and permissively licensed. However, maintenance is dormant—no updates since 2024-09-09—so evaluate whether the feature set meets your needs and whether you can maintain a fork if required. Verify that the available properties are sufficient for your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- Low install friction with no runtime dependencies.
- Maintenance is dormant—last commit was 2024-12-30, but the repository remains active and the package has received no updates since its 2024-09-09 release.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and redistribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2024-09-09 (704 days) · last repo commit 2024-12-30 · 4 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 237,843 downloads/mo, #8,952 on PyPI
Alternatives
Verify before relying
pip install diff-parser
from diff_parser import Diff
diff = Diff("path/to/diff/file.diff")
for block in diff:
print(block.new_filename)
print(block.source_hash)
print(block.target_hash)
print(block.type)- Whether the package handles edge cases in diff format variations beyond git diff.
- Performance characteristics when parsing large diff files or many files in sequence.
- Current state of the 'content' field, which documentation notes is 'to be implemented'.
What it is and what it does
diff-parser is a lightweight Python library for reading and extracting structured information from diff files. It takes a path to a git diff or .diff file and parses it into blocks, each representing a changed file with accessible properties like old and new filenames, filepaths, source and target hashes, and change type.
The package has no external runtime dependencies and supports Python 3.6 and later. It is intended for developers who need programmatic access to diff metadata—for example, in build tools, code review automation, or version control workflows. The project is dormant but stable; the last commit was 2024-12-30, and no security vulnerabilities have been reported.
Use it for
- Extract metadata about changed files from git diff output in CI/CD pipelines for conditional build steps.
- Analyze which files were modified in a commit to generate automated reports or trigger downstream tasks.
- Parse .diff files from patch management or code review tools to identify affected modules or dependencies.
- Build tooling that needs to programmatically inspect file changes without shelling out to git commands.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse diff files programmatically.
The package is simple, dependency-free, and permissively licensed. However, maintenance is dormant—no updates since 2024-09-09—so evaluate whether the feature set meets your needs and whether you can maintain a fork if required. Verify that the available properties are sufficient for your use case.
Install
diff-parser on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last commit was 2024-12-30, but the repository remains active and the package has received no updates since its 2024-09-09 release.
Requires Python 3.6 or later.
License in practice
MIT License permits unrestricted use, modification, and redistribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install diff-parser
from diff_parser import Diff
diff = Diff("path/to/diff/file.diff")
for block in diff:
print(block.new_filename)
print(block.source_hash)
print(block.target_hash)
print(block.type)
Verify before relying
- Whether the package handles edge cases in diff format variations beyond git diff.
- Performance characteristics when parsing large diff files or many files in sequence.
- Current state of the 'content' field, which documentation notes is 'to be implemented'.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 704 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 237,843 / month, #8,952 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools |
Evidence: diff_parser-1.1-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 › “parse diff files”
- diff-parserParses git diff and .diff files to extract structured metadata about…
- unidiff2Parses unified diff format into structured Python objects…
- patchParses 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 Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also xmldiff · unidiff2 · gitignorefile · dictdiffer · unidiff · csv-diff · jsondiff · gitignore-parser · patch · openstep-parser