Skip to main content

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
  • Supporting TOC updates within the package without the need to open the document manually
  • Supporting floating images within documents
  • Supporting the ability to transform word documents into PDF's

Installation

pip install skelmis-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 documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skelmis_docx-1.4.0.tar.gz (208.4 kB view details)

Uploaded Source

Built Distribution

skelmis_docx-1.4.0-py3-none-any.whl (252.6 kB view details)

Uploaded Python 3

File details

Details for the file skelmis_docx-1.4.0.tar.gz.

File metadata

  • Download URL: skelmis_docx-1.4.0.tar.gz
  • Upload date:
  • Size: 208.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic

File hashes

Hashes for skelmis_docx-1.4.0.tar.gz
Algorithm Hash digest
SHA256 e66258470632ebbe0121f9b33f987f1f51d6ea5eb262bb3614fe093b2e584f79
MD5 dadc12331a85e4e3784502454b1fb381
BLAKE2b-256 ecaf00e1dab839634424d8870dbe60914cf2c798a2f12eba40587fe4fca82a38

See more details on using hashes here.

File details

Details for the file skelmis_docx-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: skelmis_docx-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 252.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic

File hashes

Hashes for skelmis_docx-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7c5201e99aaf438982c70f18b66b89bf34b2328507931244bca98fa54b84234
MD5 f26e60e27a0fe580b4c7c9d9eba03ae9
BLAKE2b-256 b801f7ecfb4efbbd5a20d0f6788479df84a52de51e08511fa91c9b2a81cc4f75

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page