Python docx template engine
Project description
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.
Documentation
Please, read the doc
Other projects
If you like python-docx-template, please have a look at some of my other projects :
django-listing : A listing/table library on steroid for Djano
python-textops3 : Chainable text operations
django-robohash-svg : Create svg robots avatars
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docxtpl-0.20.2.tar.gz.
File metadata
- Download URL: docxtpl-0.20.2.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddf3350d70b4d123208e801d585bcb313d21044a377a14f75a66d0965841de1
|
|
| MD5 |
e94daff875c1e089017dba2d1ae378cf
|
|
| BLAKE2b-256 |
b2b44435f3fcb1357ec441079c4af1dda3ea926fad6dcead4aed2d93b369944e
|
File details
Details for the file docxtpl-0.20.2-py3-none-any.whl.
File metadata
- Download URL: docxtpl-0.20.2-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
626d5c570a46a62b2ca73b4d08f1c240fa031a5bc45371e1466a4fe184923d10
|
|
| MD5 |
db5a706293d32aa0645e72291a0e8f94
|
|
| BLAKE2b-256 |
a4ade07939d8e020e513d3860400413ba1e0e06102c469639b440d921337efef
|