skillfed

python-docx

Create, read, and update Microsoft Word .docx files.

python-docx Permissive license MIT Active 5,695 v1.2.0 released

Install

python-docx on PyPI

pip

pip install python-docx

uv

uv add python-docx

poetry

poetry add python-docx

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — lxml, typing_extensions
Maintenance actively maintained — 423 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: python_docx-1.2.0-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

About python-docx

from the package's own PyPI description — quoted content, verbatim

python-docx

python-docx is a Python library for reading, creating, and updating Microsoft Word 2007+ (.docx) files.

Installation

pip install python-docx

Example

>>> from docx import Document

>>> document = Document()
>>> document.add_paragraph("It was a dark and stormy night.")
<docx.text.paragraph.Paragraph object at 0x10f19e760>
>>> document.save("dark-and-stormy.docx")

>>> document = Document("dark-and-stormy.docx")
>>> document.paragraphs[0].text
'It was a dark and stormy night.'

More information is available in the python-docx documentation

Read as markdown · JSON record · Source repository · Homepage · Docs

Similar packages