Skip to main content

A python module to generate docx files from a docx template

Project description

pydocxtpl

A docx templater.

How to install

pip install pydocxtpl

How to use

To use pydocxtpl, you need to be familiar with the syntax of jinja2 template.

  • code sample
from pydocxtpl import DocxWriter

person_info = {'address': u'', 'name': u'', 'pic': '1.jpg'}
person_info2 = {'address': u'Somewhere over the rainbow', 'name': u'Hello Wizard', 'pic': '0.jpg'}
persons = [person_info, person_info2]
payload = {'persons': persons}

writer = DocxWriter('test.docx')
writer.render(payload)
writer.save('test_result.docx')

See examples.

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

pydocxtpl-0.2.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydocxtpl-0.2.1-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pydocxtpl-0.2.1.tar.gz.

File metadata

  • Download URL: pydocxtpl-0.2.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for pydocxtpl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8f9a91dd929daeb1f71c3bbecd9d0144c7f34ef0f593fffa247a8d2584fa530c
MD5 7e716ddff69aa593b2c019868d413fdd
BLAKE2b-256 920d2895d9e0038c6a8676027293506a76bf55615419f09ce19ef593bf36033f

See more details on using hashes here.

File details

Details for the file pydocxtpl-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pydocxtpl-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for pydocxtpl-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 457a34d89e224ce7c78b219423075cfdefc03d45163750c15cf940feef95d81c
MD5 23b57d665405600dfb8327fcbe99759c
BLAKE2b-256 35b263684673b87b81ad605ccb628c57b057e8bb94fd578d5c234e7bcc6ccb34

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