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.
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
Metadata
Release files for docxtpl 0.20.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| docxtpl-0.20.2.tar.gz | 17.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docxtpl-0.20.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.8 kB
Release files / docxtpl-0.20.2.tar.gz
| Download URL | docxtpl-0.20.2.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eddf3350d70b4d123208e801d585bcb313d21044a377a14f75a66d0965841de1
|
|
BLAKE2b-256 checksum How to use checksums |
b2b44435f3fcb1357ec441079c4af1dda3ea926fad6dcead4aed2d93b369944e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / docxtpl-0.20.2-py3-none-any.whl
| Download URL | docxtpl-0.20.2-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
626d5c570a46a62b2ca73b4d08f1c240fa031a5bc45371e1466a4fe184923d10
|
|
BLAKE2b-256 checksum How to use checksums |
a4ade07939d8e020e513d3860400413ba1e0e06102c469639b440d921337efef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for docxtpl 0.20.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.