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.2.0.tar.gz
(5.7 MB
view details)
Built Distribution
python_docx-1.2.0-py3-none-any.whl
(253.0 kB
view details)
File details
Details for the file python_docx-1.2.0.tar.gz
.
File metadata
- Download URL: python_docx-1.2.0.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7bc9d7b7d8a69c9c02ca09216118c86552704edc23bac179283f2e38f86220ce
|
|
MD5 |
33e6052d6583dcb0092d0c80057354aa
|
|
BLAKE2b-256 |
a9f7eddfe33871520adab45aaa1a71f0402a2252050c14c7e3009446c8f4701c
|
File details
Details for the file python_docx-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: python_docx-1.2.0-py3-none-any.whl
- Upload date:
- Size: 253.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3fd478f3250fbbbfd3b94fe1e985955737c145627498896a8a6bf81f4baf66c7
|
|
MD5 |
f0e72a7afdf7947db39802e23b22dc13
|
|
BLAKE2b-256 |
d0001e03a4989fa5795da308cd774f05b704ace555a70f9bf9d3be057b680bcf
|