$npx skillfedfor your agent

whatthepatch

A patch parsing and application library.

Worth itPyPI Software DevelopmentReleased Nov 20242.6M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — whatthepatch-1.0.7-py3-none-any.whl
v1.0.7 · released 2024-11-16 · Python >=3.9

Yes. The library is stable, has no dependencies, and solves a clear problem—parsing and applying patches—with low friction. The permissive license and active repository maintenance make it safe to rely on. The caveat is that the maintainer does not actively fix reported issues, so verify that the documented formats cover your use case before adopting it.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Maintenance is active but minimal—the library has been stable for years with infrequent updates; pull requests are accepted and released, but issues may not be addressed by the maintainer.

License · maintenance · safety

permissive license (permissive) — Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.

last release 2024-11-16 (636 days) · last repo commit 2026-08-04 · 78 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,648,129 downloads/mo, #2,962 on PyPI

Verify before relying

pip install whatthepatch

import whatthepatch
with open('somechanges.patch') as f:
    text = f.read()
for diff in whatthepatch.parse_patch(text):
    result = whatthepatch.apply_diff(diff, original_text)
  • Whether the library handles all real-world patch edge cases or only the documented diff formats
  • Performance characteristics when parsing or applying very large patch files
Same gist for agents: .md · .json

What it is and what it does

What The Patch is a Python library for parsing patch files and applying them to text. It reads diffs in standard formats (unified, context, normal, ed, rcs) and from source control systems (Git, SVN, CVS), extracting the changes into structured data that describes which lines were added, removed, or kept unchanged. You can then apply those changes to a file's text to reconstruct the patched version.

The library has been stable since its 1.0 release and requires no external dependencies. It works by default without needing the system patch command, though you can opt to use it if available. The maintainer notes that while the functions are reliable, they are not ideally implemented and active development is minimal—pull requests are welcome and will be merged and released, but reported issues may not be fixed.

Use it for

  • Parse a patch file to inspect what changes it contains before applying it to your codebase.
  • Apply a Git, SVN, or CVS patch to text in memory without invoking external tools.
  • Build a tool that needs to understand or manipulate diffs programmatically.
  • Validate patch compatibility or extract metadata from patch files.
  • Reconstruct a modified version of a file by applying a stored patch to the original text.

Worth the install?

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

Worth it

Yes.

The library is stable, has no dependencies, and solves a clear problem—parsing and applying patches—with low friction. The permissive license and active repository maintenance make it safe to rely on. The caveat is that the maintainer does not actively fix reported issues, so verify that the documented formats cover your use case before adopting it.

Install

whatthepatch on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is active but minimal—the library has been stable for years with infrequent updates; pull requests are accepted and released, but issues may not be addressed by the maintainer.

License in practice

Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install whatthepatch

import whatthepatch
with open('somechanges.patch') as f:
    text = f.read()
for diff in whatthepatch.parse_patch(text):
    result = whatthepatch.apply_diff(diff, original_text)

Verify before relying

  • Whether the library handles all real-world patch edge cases or only the documented diff formats
  • Performance characteristics when parsing or applying very large patch files

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 636 days since the last release
Last repo commit
First released
Downloads2,648,129 / month, #2,962 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Version ControlTopic :: Text Processing

Evidence: whatthepatch-1.0.7-py3-none-any.whl

Tags

Capabilities
patch file parserdiff parsing libraryapply patch to textunified diff parsergit patch parserversion control diff
Topics
diff-parsingpatch-application
PyPI keywords
patchdiffparser

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 › “patch file parser”

  • whatthepatchParses and applies patch files in multiple diff formats (unified,…
  • 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 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 patch · patch-ng · unidiff2 · diff-match-patch · unidiff · dictdiffer · fast-diff-match-patch · bsdiff4 · moreorless · daff