GitHub - datadavev/python-docx: Create and modify Word documents with Python

https://travis-ci.org/python-openxml/python-docx.svg?branch=master

python-docx is a Python library for creating and updating Microsoft Word (.docx) files.

More information is available in the python-docx documentation.

This fork of the repository includes a merge from renejsum's fork with recent master from the origin to support read/write access to custom metadata properties of the document. For example:

>>> import docx
>>> d = docx.Document('test1.docx')
>>> p = d.custom_properties
>>> print(p['prov_wasDerivedFrom'])
fid://slap.G24X2UWc
>>> p['prov_wasAssociatedWith'] = 'some other value'
>>> d.save('test1.docx')