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.

2.0.0 bundles Docxodus v14.1.0. Python call signatures and supported settings are unchanged from 1.0.0, but comparison markup and revision granularity can differ. Review representative redlines when upgrading; see the 2.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 2.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 2.0.0
File Size Uploaded Provenance Actions
python_redlines-2.0.0.tar.gz 8.9 kB With provenance Details for python_redlines-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.6 kB

Release files / python_redlines-2.0.0.tar.gz

Download URL python_redlines-2.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a19554bb83f120d1bd18dd1678a49c11ee30a1e60081f51c9d887dd6126f9970
BLAKE2b-256 checksum
How to use checksums
4ab839ccf6a6361141c868a8eb50e3bf8f84ba173cf4c936618b780f20a721b4
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 Oct 24, 2026.

Transparency log

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

Download URL python_redlines-2.0.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8b003553660f9b9dbd4ea33b715a9e32cefcd921c3baa6de9f4eb91d50976ea
BLAKE2b-256 checksum
How to use checksums
05270a9d937d7127fc2bf5d1f707c98010dd474b8b54feb177bec067c56d712b
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 Oct 24, 2026.

Transparency log

Security for python-redlines 2.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-2.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 Oct 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