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.0.1.tar.gz (5.6 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.0.1-py3-none-any.whl (237.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-docx-1.0.1.tar.gz
  • Upload date:
  • Size: 5.6 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.0.1.tar.gz
Algorithm Hash digest
SHA256 255148e15a4414244ec75f50e92d19864e52a7416768c65491707a7414659524
MD5 86f3652ea70b4284242f61893ff041f8
BLAKE2b-256 af5d70d69d2c097bbc76e82be4c7ba7937f97c5ba10bf92b69060187810473c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_docx-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 237.4 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 851340c49b36f917a1838a44c602a5a0702c0c3507b9890969545732dc10d2d1
MD5 d21f0fb1fd90a293592fa817015f5270
BLAKE2b-256 ea82ddb60b44c6e39a74bd406fab7d7c102ce7dfca2dff9515dfd6edc7d25f1e

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