$npx skillfedfor your agent

unidiff2

Unified diff parsing/metadata extraction library.

With conditionsPyPI Software DevelopmentReleased Oct 2025196.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — unidiff2-0.7.8-py3-none-any.whl
v0.7.8 · released 2025-10-30 · Python >=3.7

Yes, if you need to parse unified diffs in Python and want a dependency-free solution. The low install friction and permissive license are advantages. However, the package is very new (first release October 2025) and aging maintenance status means you should verify that it meets your stability expectations and that the original unidiff project hasn't resumed active development before committing to it in production.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction—pure Python wheel with no runtime dependencies.
  • Maintenance status is aging: last commit was 2025-11-03 and the package is only a few months old (first release 2025-10-03), so long-term stability is unproven.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.

last release 2025-10-30 (288 days) · last repo commit 2025-11-03 · 1 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 196,523 downloads/mo, #9,784 on PyPI

Verify before relying

pip install unidiff2

from unidiff import PatchSet
patch = PatchSet.from_filename('file.diff', encoding='utf-8')
for patched_file in patch:
    print(f"{patched_file.path}: +{patched_file.added} -{patched_file.removed}")
  • Whether this fork is actively maintained long-term or if the original unidiff package has resumed development
  • Performance characteristics when parsing very large diff files
  • Compatibility with edge cases in diff formats from different tools (e.g., Mercurial, Bazaar, Subversion)
Same gist for agents: .md · .json

What it is and what it does

unidiff2 is a Python library that parses unified diff format (the standard output of `git diff`, `patch` files, and similar tools) into a structured object model. It lets you programmatically inspect which files changed, how many lines were added or removed, access individual hunks and their line-by-line content, and regenerate diff output from the parsed structure.

The package is a maintained fork of the original unidiff library. It has no external runtime dependencies and supports Python 3.7 through 3.11. You can load diffs from files, file-like objects, or iterables, and optionally parse metadata-only for efficiency. It also provides a command-line tool to summarize diff statistics.

Use it for

  • Analyze git diffs programmatically in CI/CD pipelines to enforce code review policies or generate reports
  • Parse patch files to determine which files and functions were modified without applying the patch
  • Build tooling that needs to understand the structure of code changes (e.g., impact analysis, test selection)
  • Extract and display diff statistics in a custom format or dashboard

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse unified diffs in Python and want a dependency-free solution.

The low install friction and permissive license are advantages. However, the package is very new (first release October 2025) and aging maintenance status means you should verify that it meets your stability expectations and that the original unidiff project hasn't resumed active development before committing to it in production.

Install

unidiff2 on PyPI

Before you install

Low friction—pure Python wheel with no runtime dependencies. Maintenance status is aging: last commit was 2025-11-03 and the package is only a few months old (first release 2025-10-03), so long-term stability is unproven.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.

Quickstart

pip install unidiff2

from unidiff import PatchSet
patch = PatchSet.from_filename('file.diff', encoding='utf-8')
for patched_file in patch:
    print(f"{patched_file.path}: +{patched_file.added} -{patched_file.removed}")

Verify before relying

  • Whether this fork is actively maintained long-term or if the original unidiff package has resumed development
  • Performance characteristics when parsing very large diff files
  • Compatibility with edge cases in diff formats from different tools (e.g., Mercurial, Bazaar, Subversion)

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 288 days since the last release
Last repo commit
First released
Downloads196,523 / month, #9,784 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: unidiff2-0.7.8-py3-none-any.whl

Tags

Capabilities
parse unified diff formatdiff parsing libraryextract patch metadataread git diff programmaticallyunified diff parser
Topics
diff-parsingversion-control
PyPI keywords
unifieddiffparsemetadata

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 unified diff format”

  • unidiff2Parses unified diff format into structured Python objects…
  • unidiffParses unified diff format data 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 Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also unidiff · patch · whatthepatch · types-unidiff · moreorless · patch-ng · diff-parser · diff-match-patch · icdiff · reqif