skillfed

python-docx-ml6

Create, read, and update Microsoft Word .docx files. This is a fork from the original library that includes feature requests that have been provided by the open source community but have not yet been merged in the original package.

python-docx-ml6 v1.0.2 133.1K downloads/30d#11,531 on PyPI0
Permissive license MIT DORMANT released

What it is and what it does

python-docx-ml6 is a fork of the original python-docx library that adds community-requested features not yet merged upstream. It lets you programmatically read, create, and modify Microsoft Word 2007+ (.docx) files from Python code. The package wraps the Office Open XML format and provides a high-level API for common operations like adding paragraphs and saving documents.

The library depends on lxml for XML parsing and typing-extensions for type hints. It supports Python 3.7 through 3.11 and carries a Production/Stable classifier, though the repository has been dormant since November 2023 with no updates since its initial release.

Use it for:

  • Generate Word documents programmatically from templates or data sources for reports, invoices, or mail-merge workflows.
  • Parse and extract text content from existing .docx files for data migration or document analysis.
  • Modify existing Word documents by reading them in, updating paragraphs, and saving the changes back.
  • Automate document creation in batch processes where manual editing is impractical.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Reads, creates, and updates Microsoft Word 2007+ (.docx) files from Python, with support for paragraphs, text, and document-level operations.

Yes, if you need to work with .docx files and the fork's additional features align with your use case. The low install friction and permissive MIT license make it a straightforward choice. However, be aware that maintenance is dormant—no updates since November 2023—so you should verify that the fork's specific enhancements meet your needs and accept that you may need to maintain a local patch if bugs arise.

Install

python-docx-ml6 on PyPI

pip

pip install python-docx-ml6

uv

uv add python-docx-ml6

poetry

poetry add python-docx-ml6

Installing python-docx-ml6

Before you install

Low friction install with only two runtime dependencies (lxml and typing-extensions). Maintenance is dormant—last commit was 2023-11-03 and no releases since initial 1.0.2 in November 2023—so expect no active bug fixes or updates.

License in practice

MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restriction.

Quickstart

pip install python-docx-ml6

from docx import Document

document = Document()
document.add_paragraph("It was a dark and stormy night.")
document.save("dark-and-stormy.docx")

Verify before relying

  • Which specific feature requests from the open-source community are included in this fork that differ from the original python-docx.
  • Whether the fork remains compatible with the original python-docx API or introduces breaking changes.
  • Active maintenance status and whether the fork will receive updates if the original library merges pending features.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — lxml, typing-extensions
Maintenance dormant — 1,009 days since the last release
Last repo commit
First released
Downloads 133,051/month — #11,531 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_docx_ml6-1.0.2-py3-none-any.whl

Keywords: docx, office, openxml, word

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Office/Business :: Office SuitesTopic :: Software Development :: Libraries

Tags

read write docx filesmicrosoft word python librarycreate word documents programmaticallydocx manipulation pythonword document generationopenxml python library
document-generationoffice-automation

More Libraries packages