Skip to main content

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

Metadata

Release files for python-docx 1.2.0

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

Source distribution (sdist)

Source distribution for python-docx 1.2.0
File Size Uploaded
python_docx-1.2.0.tar.gz 5.7 MB Details

Built distribution (wheel)

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

Total release size: 6.0 MB

Release files / python_docx-1.2.0.tar.gz

Download URL python_docx-1.2.0.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
7bc9d7b7d8a69c9c02ca09216118c86552704edc23bac179283f2e38f86220ce
BLAKE2b-256 checksum
How to use checksums
a9f7eddfe33871520adab45aaa1a71f0402a2252050c14c7e3009446c8f4701c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / python_docx-1.2.0-py3-none-any.whl

Download URL python_docx-1.2.0-py3-none-any.whl
Size 253.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fd478f3250fbbbfd3b94fe1e985955737c145627498896a8a6bf81f4baf66c7
BLAKE2b-256 checksum
How to use checksums
d0001e03a4989fa5795da308cd774f05b704ace555a70f9bf9d3be057b680bcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23
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