A simple tool to replace placeholders and base64 images in Word .docx templates
Project description
📝 json2docx
json2docx is a Python library that fills Word .docx templates using a dictionary of values.
It replaces text placeholders and base64-encoded images (matched via alt text) recursively in paragraphs and tables.
✅ Features
- 🔤 Replace text placeholders like
{{key}} - 🖼 Replace images using base64 data matched by image Alt Text
- 🔁 Works recursively inside tables, rows, and cells
- 📄 Supports both
.docxparagraphs and tables - 🪄 Easy to integrate in automation and document generation workflows
📦 Installation
pip install json2docx
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
json2docx-0.1.0.tar.gz
(1.7 kB
view details)
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 json2docx-0.1.0.tar.gz.
File metadata
- Download URL: json2docx-0.1.0.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8324bd8ea8186b8500eb7cab6877c64ab6a4b398b5641d452b8f1866f3da01
|
|
| MD5 |
c78518254d4086fe735ee0ab43ba5884
|
|
| BLAKE2b-256 |
71e64893ac65f64689df8500d5d8bcf2c6948880e11d7a6a2cd75a16df01aae1
|
File details
Details for the file json2docx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: json2docx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adca145076995e46258ba8f8f2ee49b0d958cadc9cea00c29e98a1dce29ca17e
|
|
| MD5 |
eb9b990fa9409b617e81b5bea7b174a6
|
|
| BLAKE2b-256 |
d367bdd18734338720fc5f416294c14f608d2a05e98dcb810940e19149b35325
|