skillfed

docx

The docx module creates, reads and writes Microsoft Office Word 2007 docx files

docx v0.2.4 381.4K downloads/30d#7,096 on PyPI1,075
License unclear UNKNOWN Abandoned released

What it is and what it does

The docx module is a pure-Python library for creating, reading, and editing Microsoft Word 2007 docx files without requiring Office or COM automation. It can generate documents with paragraphs, bullets, numbered lists, headings, tables, page breaks, and images, and can parse existing docx files to extract text, search and replace content, and run XPath queries on document structure.

The project was last updated in 2014 and is now archived. While it has moderate download volume, its abandonment means no bug fixes, security updates, or compatibility improvements for modern Python versions. The install friction is high due to tarball-only distribution and external dependencies (lxml, PIL). Use only if you need legacy docx support in an older codebase; for new projects, consider actively maintained alternatives.

Use it for:

  • Generate Word documents programmatically from Python scripts or web applications without Office installed.
  • Extract plain text from existing docx files for indexing, analysis, or migration to other formats.
  • Automate document creation with dynamic content like reports, invoices, or mail-merge templates.
  • Parse user-completed Word document templates using XPath queries to extract structured data.
  • Modify existing docx files by adding, deleting, or replacing content at specific locations.

Worth the install?

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

Creates, reads, and writes Microsoft Office Word 2007 docx files in pure Python without requiring Office, COM automation, or external tools.

No. The package is abandoned (last update 2014, archived repository), has high install friction (tarball only, external build dependencies), and offers no Python version guarantee for modern environments. For new projects, use python-docx (the actively maintained fork) or another current library. Only consider this version if you have legacy code already depending on it and cannot migrate.

Install

docx on PyPI

pip

pip install docx

uv

uv add docx

poetry

poetry add docx

Installing docx

Before you install

High install friction: the package distribution is a bare tarball with no wheel, and the project has been abandoned since 2015 with no maintenance activity for many years. Dependency on lxml and PIL adds system-level build requirements.

License in practice

License treatment is unclear; the description mentions MIT licensing but the metadata shows 'UNKNOWN'. Verify the actual license terms before relying on this package in a commercial or copyleft-sensitive context.

Quickstart

pip install docx

from docx import Document

doc = Document()
doc.add_paragraph('Hello, World!')
doc.save('output.docx')

Requires lxml and PIL (Pillow) system dependencies; no Python version constraint specified in metadata, so compatibility with modern Python versions is unverified.

Verify before relying

  • Actual Python version compatibility—metadata specifies no minimum or maximum, and the project has not been updated since 2015.
  • Whether lxml and PIL are truly required at runtime or only for certain features (image handling).
  • Current state of the MIT license claim given the 'UNKNOWN' metadata tag.

Package facts

License UNKNOWN (unclear)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,572 days since the last release
Last repo commit (repository archived)
First released
Downloads 381,350/month — #7,096 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: docx-0.2.4.tar.gz

Tags

create word documents pythonread write docx filesmicrosoft word docx librarygenerate word documents programmaticallydocx file manipulationoffice open xml pythonword document generation
abandonedlegacy-package

More Markup packages