Metadata-Version: 2.4
Name: ps-python-docx
Version: 1.3.1
Summary: A maintained fork of python-docx for reading and authoring Microsoft Word documents.
Author-email: Steve Canny <stcanny@gmail.com>
Maintainer: John Paul Ellis
License: MIT
Project-URL: Changelog, https://github.com/pseudosavant/python-docx/blob/master/HISTORY.rst
Project-URL: Documentation, https://python-docx.readthedocs.org/en/latest/
Project-URL: Homepage, https://github.com/pseudosavant/python-docx
Project-URL: Repository, https://github.com/pseudosavant/python-docx
Project-URL: Issues, https://github.com/pseudosavant/python-docx/issues
Project-URL: Upstream, https://github.com/python-openxml/python-docx
Keywords: docx,office,openxml,word
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lxml>=3.1.0
Requires-Dist: typing_extensions>=4.9.0
Dynamic: license-file

# ps-python-docx

*ps-python-docx* is John Paul Ellis's fork of [python-docx](https://github.com/python-openxml/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](docs/api/theme.rst). 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](docs/api/text.rst).

## Installation

```
pip install ps-python-docx
```

## Example

```python
>>> 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](https://python-docx.readthedocs.org/en/latest/). Report fork-specific issues in [this repository](https://github.com/pseudosavant/python-docx/issues).

## Development and releases

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

```text
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](RELEASING.md) for the GitHub-to-PyPI release process.
