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.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-1.1.0-py3-none-any.whl (239.6 kB view details)

Uploaded Python 3

File details

Details for the file python-docx-1.1.0.tar.gz.

File metadata

  • Download URL: python-docx-1.1.0.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for python-docx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5829b722141cf1ab79aedf0c34d9fe9924b29764584c0f2164eb2b02dcdf17c9
MD5 5eec0cce48aa886d5a4f72337b3d08a8
BLAKE2b-256 3c82eb6c794e61b7060d465a23917161da4ab554dccce07a3b44a0d69a61ea7d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for python_docx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bac9773278098a1ddc43a52d84e22f5909c4a3080a624530b3ecb3771b07c6cd
MD5 49ed59c5b7da156237d3a2a2cb240703
BLAKE2b-256 5fd86948f7ac00edf74bfa52b3c5e3073df20284bec1db466d13e668fe991707

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