Skip to main content

A library to generate Microsoft Office Word 2007 documents.

Project description

docxgen is a python library to generate Microsoft Office Word 2007 Document. Without knowing the details of the WordprocessingML, you may create a beautiful Word Document, as:

from docxgen import Document, title
doc = Document()
doc.update(
    title='Moby Dick',
    creator='Herman Melville',
    created=datetime(...)
)

body = doc.body
body.append(title('Moby Dick'))
body.append(subtitle('Moby Dick'))
body.append(h1('Chapter 1'))
body.append(paragraph([run('Call me Ishmael. Some years ago ...')]))

doc.save('/tmp/moby-dick.docx')

This work is proudly sponsored by SurveyMonkey Inc, and licensed in MIT license.

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

docxgen-0.1.4.tar.gz (23.0 kB view hashes)

Uploaded Source

Supported by

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