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.
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-ml6uv
uv add python-docx-ml6poetry
poetry add python-docx-ml6Installing 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
python-docxpython-docx reads, creates, and modifies…
permissive · top 1,000 on PyPI
docxCreates, reads, and writes Microsoft Office…
unclear · top 15,000 on PyPI
docxtplGenerates Word documents (.docx) from templates…
copyleft · top 5,000 on PyPI
python-pptxpython-pptx creates, reads, and updates…
permissive · top 1,000 on PyPI
htmldocxConverts HTML content into Microsoft Word…
permissive · top 5,000 on PyPI
html-for-docxConverts HTML content to Word documents…
permissive · top 15,000 on PyPI
docx-mailmerge2Performs mail merge operations on docx files by…
permissive · top 15,000 on PyPI
docx-mailmergePerforms mail merge operations on docx files by…
permissive · top 15,000 on PyPI
spire-docSpire.Doc creates, reads, modifies, and…
unclear · top 15,000 on PyPI
docx2txtExtracts text, headers, footers, hyperlinks,…
unclear · top 5,000 on PyPI