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.

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


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.1.2.tar.gz (5.7 MB view details)

Uploaded Source

Built Distribution

python_docx-1.1.2-py3-none-any.whl (244.3 kB view details)

Uploaded Python 3

File details

Details for the file python_docx-1.1.2.tar.gz.

File metadata

  • Download URL: python_docx-1.1.2.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for python_docx-1.1.2.tar.gz
Algorithm Hash digest
SHA256 0cf1f22e95b9002addca7948e16f2cd7acdfd498047f1941ca5d293db7762efd
MD5 24853c53a15775343dc47c495af25790
BLAKE2b-256 35e4386c514c53684772885009c12b67a7edd526c15157778ac1b138bc75063e

See more details on using hashes here.

File details

Details for the file python_docx-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: python_docx-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 244.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for python_docx-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08c20d6058916fb19853fcf080f7f42b6270d89eac9fa5f8c15f691c0017fabe
MD5 6e417ace8e26970be1b1fa41ffa9723d
BLAKE2b-256 3e3d330d9efbdb816d3f60bf2ad92f05e1708e4a1b9abe80461ac3444c83f749

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