Skip to main content

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

Project description

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 accepts engine="wmlcomparer" (default) or engine="docxdiff" to select the comparison algorithm. See the project README.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_redlines-0.3.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_redlines-0.3.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file python_redlines-0.3.0.tar.gz.

File metadata

  • Download URL: python_redlines-0.3.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_redlines-0.3.0.tar.gz
Algorithm Hash digest
SHA256 10c988de48adcf09289a1e3cc7e536b43bec06c4475221799ddf36d4080205f7
MD5 d6d8a5cb6e226053862feeed7abe7faf
BLAKE2b-256 e45c6fcb4ba556f840603c5e3aff322d211164bbbc4146b944d7a35ca83d2f43

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_redlines-0.3.0.tar.gz:

Publisher: python-publish.yml on JSv4/Python-Redlines

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_redlines-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_redlines-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 399d4842f7c6548f88e72b90e9cdaaaf45702d4d26195cdbc61e09e81dd68619
MD5 61fb8905ea6eed46d0148f1bfff0d2fe
BLAKE2b-256 53cabe0855e688cee86f29e887520419310948d74271bc245aa8a927b3764ab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_redlines-0.3.0-py3-none-any.whl:

Publisher: python-publish.yml on JSv4/Python-Redlines

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page