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.
This repository exists as a fork of the official repo as I needed features and quality of life improvements.
Key differences at a glance:
- Supporting multiple numbered lists within a document (1, 2)
- Supporting TOC updates within the package without the need to open the document manually (1, 2)
- Supporting floating images within documents (1)
- Supporting the ability to transform word documents into PDF's (1)
- Horizontal rules + paragraph bounding boxes / borders (1, 2)
- External hyperlinks (1)
- Internal hyperlinks (Linking to bookmarks) (1)
- Creating bookmarks (1)
- The ability to insert a customisable Table of Contents (ToC) (1)
Installation
pip install skelmis-docx
Example
>>> from skelmis.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 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
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
File details
Details for the file skelmis_docx-2.3.0.tar.gz.
File metadata
- Download URL: skelmis_docx-2.3.0.tar.gz
- Upload date:
- Size: 207.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25fdef85d3e805657f5bc40e89b853e0a6deecc3365d8edd206bdb6ad6e3deb2
|
|
| MD5 |
b86c163ea1ac412bfbb3d6cfa3ffc04f
|
|
| BLAKE2b-256 |
0047dbbbf54f4f46368984be9e78dc709454416f2ee9522ac5d1a6cc0b917b4d
|
File details
Details for the file skelmis_docx-2.3.0-py3-none-any.whl.
File metadata
- Download URL: skelmis_docx-2.3.0-py3-none-any.whl
- Upload date:
- Size: 259.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c918aee5d08c2962833b1ba49c583a1e3aeb20c747185587e8d88aa7dbafddea
|
|
| MD5 |
fa7d7604f8d466c9c753fad2ed9a4403
|
|
| BLAKE2b-256 |
a77f69ba352c927f2a33f34484a70c3391e87ee3df35d6e9dc55ceb008225e60
|