Create, read, and update Microsoft Word .docx files.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_docx-1.1.1.tar.gz
(5.7 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
python_docx-1.1.1-py3-none-any.whl
(242.8 kB
view details)
File details
Details for the file python_docx-1.1.1.tar.gz.
File metadata
- Download URL: python_docx-1.1.1.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15473bd40a7c16d9367b0a4b2cbbab0a787904fa2f7cadae1ed6f96201dcbb66
|
|
| MD5 |
96b2b1be56f5f80365c3f92a29e36664
|
|
| BLAKE2b-256 |
c165188638757fc0d364a5f064705e9b157b148f6df67e235ada74a24ba17e71
|
File details
Details for the file python_docx-1.1.1-py3-none-any.whl.
File metadata
- Download URL: python_docx-1.1.1-py3-none-any.whl
- Upload date:
- Size: 242.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc09412cef1a9ce7756d52376158f94f2a0edd0fc722da1d0a074f01d83e5021
|
|
| MD5 |
d0f5171767eeb2b0144f3082b1ef0bf3
|
|
| BLAKE2b-256 |
4fb2771a3410aac134718109e78ed425b0481cfa7a53877ed2f87c0745e6da1a
|