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.0.0rc1.tar.gz
(5.6 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
File details
Details for the file python-docx-1.0.0rc1.tar.gz.
File metadata
- Download URL: python-docx-1.0.0rc1.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6c2d545c4e14e55d153da78490cf26cb905a9e2c33fa3a5b8f0876ffd58ea8e
|
|
| MD5 |
7c43298c297f901ab5366cc687ac2243
|
|
| BLAKE2b-256 |
df62822569c52ee7795ea14a606cd123a12bacb1a2238ae5c1aa49451abe387f
|
File details
Details for the file python_docx-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: python_docx-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 230.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f89dc28bf6cc18124dcd6f6aae9835204786a964340a3ec7d769716a94d7b09
|
|
| MD5 |
f33c84de572d2a808fda935a3ebc28df
|
|
| BLAKE2b-256 |
2be17adb4682ab582dfed274e65173dd23214be83568a7a961b9baaf40a0e987
|