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.1.tar.gz
(5.6 MB
view hashes)
Built Distribution
python_docx-1.0.1-py3-none-any.whl
(237.4 kB
view hashes)
Close
Hashes for python_docx-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 851340c49b36f917a1838a44c602a5a0702c0c3507b9890969545732dc10d2d1 |
|
MD5 | d21f0fb1fd90a293592fa817015f5270 |
|
BLAKE2b-256 | ea82ddb60b44c6e39a74bd406fab7d7c102ce7dfca2dff9515dfd6edc7d25f1e |