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 hashes)
Built Distribution
python_docx-1.1.1-py3-none-any.whl
(242.8 kB
view hashes)
Close
Hashes for python_docx-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc09412cef1a9ce7756d52376158f94f2a0edd0fc722da1d0a074f01d83e5021 |
|
MD5 | d0f5171767eeb2b0144f3082b1ef0bf3 |
|
BLAKE2b-256 | 4fb2771a3410aac134718109e78ed425b0481cfa7a53877ed2f87c0745e6da1a |