Skip to main content

python-redlines

Generate tracked-change "redline" .docx documents by comparing two Word files.

python-redlines is the pure-Python core. The comparison engines themselves are compiled .NET binaries shipped in separate, optional companion packages — install the one(s) you need as extras:

pip install python-redlines[docxodus]          # Docxodus engine
pip install python-redlines[ooxmlpowertools]    # Open-XML-PowerTools engine
pip install python-redlines[all]                # both

Binaries are prebuilt for each platform and embedded in the companion package's wheel — no .NET SDK and no local compilation are needed to install or use it.

Usage

from python_redlines import DocxodusEngine

engine = DocxodusEngine()
redline_bytes, stdout, stderr = engine.run_redline(
    "Author Name",
    original=open("original.docx", "rb").read(),
    modified=open("modified.docx", "rb").read(),
)

DocxodusEngine runs DocxDiff. The engine selector was removed in 1.0.0 along with WmlComparer. See the project README for supported settings.

From 2.0.0 onward, each extra pins its companion package to the same release version as the wrapper. For older releases, pin both packages explicitly (for example, python-redlines[docxodus]==0.3.0 and python-redlines-docxodus==0.3.0). Existing published metadata is unchanged.

3.0.0 bundles Docxodus v17.0.0 and adds one setting, minimum_anchor_word_count. Existing call signatures and settings are unchanged from 2.0.0, but comparison markup and revision counts can differ, and some very deeply nested documents are now refused. It requires Python 3.11 or newer; 2.0.0 was the last release to support 3.9 and 3.10. Review representative redlines when upgrading; see the 3.0.0 migration guide.

An unsuccessful engine exit raises EngineExecutionError, a subclass of subprocess.CalledProcessError. Its message includes the captured stderr and stdout; returncode, cmd, stdout/output, and stderr remain available.

If an engine's companion package is not installed, instantiating the engine raises EngineNotInstalledError with the pip install command to fix it.

See the project repository for details.

Metadata

Release files for python-redlines 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-redlines 3.0.0
File Size Uploaded Provenance Actions
python_redlines-3.0.0.tar.gz 9.1 kB With provenance Details for python_redlines-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-redlines 3.0.0
File Interpreter ABI Platform Actions
python_redlines-3.0.0-py3-none-any.whl Python 3 none any Details for python_redlines-3.0.0-py3-none-any.whl

Total release size: 17.0 kB

Release files / python_redlines-3.0.0.tar.gz

Download URL python_redlines-3.0.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f335681d8ffbc387abdc914baf0662735310cce26ca76ca1c4cb3e65e854afc1
BLAKE2b-256 checksum
How to use checksums
f6ddccb6c4cc0e46627db41fc2aec00bcfd0481d65a7f1db02823f3cccd94cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / python_redlines-3.0.0-py3-none-any.whl

Download URL python_redlines-3.0.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
225abad53aa2bf7a813a25abfc7e4a81a07a327a945815bd43cb1ad6c20eddae
BLAKE2b-256 checksum
How to use checksums
e06d0fd88cf887f66c5e8c0f4d70acddd6b1c3c8c5ff325151f1f30a809b8da2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for python-redlines 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for python_redlines-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page