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.2.tar.gz
(5.7 MB
view hashes)
Built Distribution
python_docx-1.1.2-py3-none-any.whl
(244.3 kB
view hashes)
Close
Hashes for python_docx-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c20d6058916fb19853fcf080f7f42b6270d89eac9fa5f8c15f691c0017fabe |
|
MD5 | 6e417ace8e26970be1b1fa41ffa9723d |
|
BLAKE2b-256 | 3e3d330d9efbdb816d3f60bf2ad92f05e1708e4a1b9abe80461ac3444c83f749 |