Skip to content

About

A source-aware, dependency-free DOCX parser for Python.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

parse-docx

parse-docx is a bounded, dependency-free DOCX parser for Python 3.14+. It reads the Office Open XML package without executing or resolving document content and returns an immutable, source-part-aware document model.

from parse_docx import load

document = load("report.docx")
print(document.text)

for block in document.blocks:
    print(block.source_part, block)

The model preserves paragraph and table order, run formatting, common heading styles, basic list numbering, and inert hyperlink targets. Headers, footers, footnotes, and endnotes are available separately. Document.text provides a safe plain-text projection of the body.

See supported features and security boundaries for parsing details, limits, and unsupported content.

Development

uv sync --locked
uv run --frozen python -W error::ResourceWarning -m pytest -q
uv run --frozen python scripts/check_distribution.py --output-dir dist

The distribution is named parse-docx; the Python import package is parse_docx.

See release instructions for Trusted Publishing setup.

About

A source-aware, dependency-free DOCX parser for Python.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages