GitHub - python-openxml/python-docx: Create and modify Word documents with Python (original) (raw)

Skip to content

Sign in

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

python-openxml / python-docx Public

Create and modify Word documents with Python

License

MIT license

5k stars 1.2k forks Branches Tags Activity

Star

Notifications You must be signed in to change notification settings

Additional navigation options

BranchesTags

Folders and files

Name Name Last commit message Last commit date
Latest commitHistory1,074 Commits
docs docs
features features
ref ref
src/docx src/docx
tests tests
typings/behave typings/behave
.gitignore .gitignore
.readthedocs.yaml .readthedocs.yaml
.travis.yml .travis.yml
HISTORY.rst HISTORY.rst
LICENSE LICENSE
MANIFEST.in MANIFEST.in
Makefile Makefile
README.md README.md
pyproject.toml pyproject.toml
requirements-dev.txt requirements-dev.txt
requirements-docs.txt requirements-docs.txt
requirements-test.txt requirements-test.txt
requirements.txt requirements.txt
tox.ini tox.ini

Repository files navigation

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

About

Create and modify Word documents with Python

Resources

Readme

License

MIT license

Activity

Custom properties

Stars

5k stars

Watchers

146 watching

Forks

1.2k forks

Report repository

Releases

36 tags

Packages

No packages published

Used by 62.6k

@gsm180789 @victorodriguezra @DrAndrewCosta @causify-ai @ifan0927 @chrscato @venureddy1718 @Kayler1303 + 62,625

Contributors11

Languages