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.0.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
python_docx-1.0.0-py3-none-any.whl
(236.1 kB
view details)
File details
Details for the file python-docx-1.0.0.tar.gz.
File metadata
- Download URL: python-docx-1.0.0.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 |
9757dd81c5198180f1111f03772d25b5a3c1959607cd83e6d0b6046465b65bd7
|
|
| MD5 |
7e2a2d48e95c2ffa4ccf02433bda1efd
|
|
| BLAKE2b-256 |
16a77e3abd1f230101048bf7780b2434924f4d970faa01dc4f80bdb66958064a
|
File details
Details for the file python_docx-1.0.0-py3-none-any.whl.
File metadata
- Download URL: python_docx-1.0.0-py3-none-any.whl
- Upload date:
- Size: 236.1 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 |
496e729ffcf5fc3cf85676f402cedfc48e68475f10a94edfbd06dde2da67ce76
|
|
| MD5 |
36f0788d926b69ee7ce32d8d07e26625
|
|
| BLAKE2b-256 |
c418e6168cebbd337f3c38c6d36387d8d2c6b24d79e990161ecfeb939927faed
|