python-docx-template

Use a docx as a jinja2 template

  • Owner: elapouya/python-docx-template
  • Platform:
  • License:: GNU Lesser General Public License v2.1
  • Category::
  • Topic:
  • Like:
    4
      Compare:

Github stars Tracking Chart

====================
python-docx-template

Use a docx as a jinja2 template

Introduction

This package uses 2 major packages :

  • python-docx for reading, writing and creating sub documents
  • jinja2 for managing tags inserted into the template docx

python-docx-template has been created because python-docx is powerful for creating documents but not for modifying them.

The idea is to begin to create an example of the document you want to generate with microsoft word, it can be as complex as you want :
pictures, index tables, footer, header, variables, anything you can do with word.
Then, as you are still editing the document with microsoft word, you insert jinja2-like tags directly in the document.
You save the document as a .docx file (xml format) : it will be your .docx template file.

Now you can use python-docx-template to generate as many word documents you want from this .docx template and context variables you will associate.

Share

If you like this project, please rate and share it here : http://rate.re/github/elapouya/python-docx-template

Documentation

Please, read the doc <http://docxtpl.readthedocs.org>_

Main metrics

Overview
Name With Ownerelapouya/python-docx-template
Primary LanguagePython
Program languagePython (Language Count: 1)
Platform
License:GNU Lesser General Public License v2.1
所有者活动
Created At2015-03-12 12:52:14
Pushed At2025-05-19 20:36:50
Last Commit At2025-05-06 16:22:18
Release Count83
Last Release Namev0.20.0 (Posted on )
First Release Name0.1.4 (Posted on 2015-03-27 09:04:14)
用户参与
Stargazers Count2.2k
Watchers Count53
Fork Count406
Commits Count431
Has Issues Enabled
Issues Count478
Issue Open Count140
Pull Requests Count86
Pull Requests Open Count2
Pull Requests Close Count31
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private