Skip to main content

ps-python-docx

ps-python-docx is John Paul Ellis's fork of python-docx, a Python library for reading, creating, and updating Microsoft Word 2007+ (.docx) files. It is published independently and is not an official upstream release.

This fork starts from upstream 1.2.0. The packaging setup preserves the upstream API and the docx import name. Version 1.3.0 adds public theme font and style inheritance APIs. See the theme API documentation. The original MIT license and upstream attribution are preserved.

Version 1.3.1 adds public external hyperlink authoring with Paragraph.add_hyperlink(), formatted label runs with Hyperlink.add_run(), and read/write tooltip support. See the text API documentation.

Version 1.3.2 adds InlineShape.description and InlineShape.title for reading and writing image alternative text. See the image metadata documentation.

Version 1.3.3 adds independent list instances, starts and restarts, template levels, and unnumbered continuation paragraphs. See the list documentation.

Version 1.3.4 adds bookmark creation and lookup with Document.bookmarks, plus internal hyperlinks with Paragraph.add_hyperlink(anchor=...). See the bookmark documentation.

Version 1.3.5 adds native footnote authoring and lookup with Document.add_footnote(), Document.footnotes, and Run.footnote_ids. See the footnote documentation.

Installation

pip install ps-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.'

Install this distribution in place of python-docx. Both provide the docx package and should not be installed in the same environment.

More information about the inherited API is available in the upstream documentation. Report fork-specific issues in this repository.

Development and releases

Run the unit and acceptance suites without installing the legacy documentation dependencies:

uv sync --locked --no-dev --group test
uv run --locked --no-dev --group test pytest -q
uv run --locked --no-dev --group test behave --format progress --stop --tags=-wip

See RELEASING.md for the GitHub-to-PyPI release process.

Release files for ps-python-docx 1.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ps-python-docx 1.3.5
File Size Uploaded
ps_python_docx-1.3.5.tar.gz 5.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ps-python-docx 1.3.5
File Interpreter ABI Platform
ps_python_docx-1.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 MB

Release files / ps_python_docx-1.3.5.tar.gz

Download URL ps_python_docx-1.3.5.tar.gz
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
93ad38b424de87e54ac6d3a681c01ac27142eb1e2354f1f17c7eb97da23639be
BLAKE2b-256 checksum
How to use checksums
bf3c70382df0ebbcfc3aa4b3cae24dbec958d9de6007fb54f2066b04cee6be54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / ps_python_docx-1.3.5-py3-none-any.whl

Download URL ps_python_docx-1.3.5-py3-none-any.whl
Size 270.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f27a9ab6a7f2da07776272bde630d67bd6e2e37ecf931029c69ce3b8b13cffe
BLAKE2b-256 checksum
How to use checksums
01f841fa2572071e83649df95b4fa1f66a6785d043d4b644907a93855fb1de71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.7

2 release files

1.3.6

2 release files

This release

1.3.5 This release

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page