moreorless
Python diff wrapper
Decision gist · record as of 2026-08-14
Yes. The package solves a real edge case (newline-at-eof handling) that the standard library doesn't address cleanly, has zero base dependencies, is actively maintained, carries no known vulnerabilities, and uses a permissive MIT license. Install the base package for diff generation; add the `[cli]` extra only if you need colored terminal output.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Optional `cli` extra (click dependency) needed for colored output functions.
- Low install friction with no runtime dependencies.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.
last release 2026-05-12 (94 days) · last repo commit 2026-05-12 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,459,933 downloads/mo, #2,615 on PyPI
Alternatives
Verify before relying
pip install moreorless
import moreorless
diff_output = moreorless.unified_diff('old content', 'new content', 'file.txt')
print(diff_output)- Whether the package is actively used in production or primarily for development tooling
- Performance characteristics when diffing large files or applying complex patches
What it is and what it does
moreorless is a thin wrapper around Python's standard `difflib.unified_diff` that simplifies the API and correctly handles the edge case of files without trailing newlines—a common source of bugs in diff tools. It provides three main entry points: a core `unified_diff()` function that takes two strings and returns a unified diff, a `patch.apply_single_file()` function to apply patches to file contents, and optional colored output helpers via the `cli` extra that use click to display diffs with syntax highlighting.
The package is lightweight with zero runtime dependencies in its base form, making it suitable for embedding in other tools or libraries that need reliable diff generation. It follows semantic versioning and is compatible with Python 3.9 and later. The colored output and patch-application features are available as optional add-ons, so you can install just the core diffing functionality if you don't need click-based terminal output.
Use it for
- Generate clean unified diffs in code review or testing tools that need correct newline-at-eof handling
- Apply patches programmatically to file contents with optional offset tolerance for resilience
- Display side-by-side or colored diffs in CLI tools using the click integration
- Merge diffs from multiple sources using the combined_diff function for complex version control scenarios
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real edge case (newline-at-eof handling) that the standard library doesn't address cleanly, has zero base dependencies, is actively maintained, carries no known vulnerabilities, and uses a permissive MIT license. Install the base package for diff generation; add the `[cli]` extra only if you need colored terminal output.
Install
moreorless on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained as of May 2026, with a recent release.
Requires Python 3.9 or later. Optional `cli` extra (click dependency) needed for colored output functions.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.
Quickstart
pip install moreorless
import moreorless
diff_output = moreorless.unified_diff('old content', 'new content', 'file.txt')
print(diff_output)
Verify before relying
- Whether the package is actively used in production or primarily for development tooling
- Performance characteristics when diffing large files or applying complex patches
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 94 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,459,933 / month, #2,615 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: moreorless-0.6.0-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 › “unified diff wrapper”
- moreorlessGenerates unified diffs with correct handling of files without…
- unidiff2Parses unified diff format into structured Python objects…
- unidiffParses unified diff format data into structured Python objects,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also patch · ydiff · patch-ng · unidiff · unidiff2 · patchy · diff-match-patch · fast-diff-match-patch · icdiff · whatthepatch