# python-openxml/python-docx

Create and modify Word documents with Python

Repository: https://github.com/python-openxml/python-docx
Canonical: https://ross.abutalabs.com/products/python-docx
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-01T14:59:42+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 4705, "days_push": 32, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5697, forks 1302 (observed 2026-08-28T04:09:28.039218+00:00)

## What it is
python-docx is a Python library for creating, reading, and modifying Microsoft Word 2007+ (.docx) files using the OpenXML format. It provides a high-level API for manipulating document content such as paragraphs, tables, and styles.

## Use cases
- generate word documents from python
- read and parse docx files
- programmatically edit word document content
- create reports as docx from templates
- extract text from word documents
- automate office document workflows

## When to choose
- you need to create or edit .docx files in Python
- you want a pure-Python library without Word installed
- you need fine-grained control over document structure like paragraphs and tables

## When to avoid
- you need to work with legacy .doc files
- you need to render documents to PDF or other formats
- you need full fidelity for complex Word features like tracked changes or macros

## Facets
- artifact type: library
- maturity: stable
- function: parser, file-system, pdf
- domain: files, developer-tools
- platform: python, cross-platform
- tags: docx, word-documents, openxml, office-automation, document-generation, automation

## Member repositories
- python-openxml/python-docx (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:28.039218+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:53:37.555041+00:00, confidence not recorded.
  - readme: https://github.com/python-openxml/python-docx (fetched 2026-08-28T04:09:28.039218+00:00, sha 10447f183965)
  - registry_pypi: https://pypi.org/pypi/python-docx/json (fetched 2026-08-29T08:49:11.806912+00:00, sha 735446874838)
- Data as of 2026-08-30T08:39:29.467469+00:00.
