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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_docx_huge_tree-1.2.0-py3-none-any.whl (253.1 kB view details)

Uploaded Python 3

File details

Details for the file python_docx_huge_tree-1.2.0.tar.gz.

File metadata

  • Download URL: python_docx_huge_tree-1.2.0.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for python_docx_huge_tree-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bd8d2f1025fe2b1756ad904ef17533c2e1a1c2ac3e8486f465c8e00cc5c1e302
MD5 3fa0ee7d11049af3bb52b707104a0e0e
BLAKE2b-256 1278e5f11ed3ed4be8ba19f317bc524bbe66542d05f11d34ab9af5151bbfef1b

See more details on using hashes here.

File details

Details for the file python_docx_huge_tree-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_docx_huge_tree-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 225e32467da00a1a080b9b4ba9493ada074af2344cb6c09a05dec2c1599ae2da
MD5 2bce76633a305826ff4cc9d22b181d6f
BLAKE2b-256 c3d13710f26a66048d8a3ecd5f3242329691174e72f632779eb3dfe2657f352c

See more details on using hashes here.

Supported by

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