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.1.2

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.1.2
File Size Uploaded
python_docx-1.1.2.tar.gz 5.7 MB Details

Built distribution (wheel)

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

Total release size: 5.9 MB

Release files / python_docx-1.1.2.tar.gz

Download URL python_docx-1.1.2.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
0cf1f22e95b9002addca7948e16f2cd7acdfd498047f1941ca5d293db7762efd
BLAKE2b-256 checksum
How to use checksums
35e4386c514c53684772885009c12b67a7edd526c15157778ac1b138bc75063e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

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

Download URL python_docx-1.1.2-py3-none-any.whl
Size 244.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08c20d6058916fb19853fcf080f7f42b6270d89eac9fa5f8c15f691c0017fabe
BLAKE2b-256 checksum
How to use checksums
3e3d330d9efbdb816d3f60bf2ad92f05e1708e4a1b9abe80461ac3444c83f749
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18
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