{"categories":[{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools"}],"enrichment":{"capability":"Parses and applies unified diff patches to files, with automatic correction of linefeeds, whitespace issues, and diff prefixes.","skillfed_tags":["diff-patching","build-automation","no-dependencies"],"use_cases":["Automatically apply code patches or configuration diffs during build or deployment pipelines.","Parse and inspect unified diffs programmatically to extract or validate patch metadata.","Correct malformed patches by automatically fixing whitespace and linefeed inconsistencies.","Embed patch application logic in tools without introducing external dependencies.","Generate and display diffstat histograms for patch review or reporting."],"what_it_does":"Patch NG is a maintained fork of the original python-patch library, designed to parse and apply unified diff patches to files. It operates as a self-contained Python module with no external dependencies, making it suitable for embedding directly in projects or installing via pip. The library automatically corrects common diff issues\u2014linefeeds mismatched to the target file, diffs corrupted by whitespace stripping, and a/ and b/ prefixes\u2014and detects patch format (SVN, HG, GIT). It runs on Python 3.6 and later across Linux, Windows, and macOS.\n\nThe fork was created to address stalled maintenance in the original project, accepting pull requests that had been pending review since mid-2019. It works as both a command-line tool and a library, offering a diffstat histogram for inspection. The package does not handle file renaming, creation, removal, directory tree operations, or version-control-specific metadata; it is limited to applying unified diff formats to existing files.","worth_installing":"Yes. The package is actively maintained, has no external dependencies, and solves a specific, well-defined problem\u2014parsing and applying unified diffs with automatic correction of common issues. It is stable (Production/Stable status), widely used (top 5000 PyPI packages), carries no known vulnerabilities, and uses a permissive MIT license. Install it if you need to apply patches programmatically or embed patch logic without dependency overhead."},"id":"patch-ng","links":{"html":"https://skillfed.io/packages/patch-ng","md":"https://skillfed.io/packages/patch-ng.md","pypi":"https://pypi.org/project/patch-ng/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-23","license_spdx":null,"license_treatment":"permissive","name":"patch-ng","python_support":"supports_current","summary":"Library to parse and apply unified diffs."},"popularity":{"monthly_downloads":4710651,"position":2250,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.19.1"}
