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.6.tar.gz
(3.0 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.6.tar.gz.
File metadata
- Download URL: json2docx-0.1.6.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90da719c8bce617af445f14e778b033798150c24caf290e1e4a745bc39e2cceb
|
|
| MD5 |
5a6f4277e9ccf56a408d55d9f4dd8f7b
|
|
| BLAKE2b-256 |
11c2db118dabba8a3ee6e5f1264c857fe1570844dc216799c6e46ae28ebb6287
|
File details
Details for the file json2docx-0.1.6-py3-none-any.whl.
File metadata
- Download URL: json2docx-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.3 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 |
8245515905bfc6e7df57713b38921c6cf192d97932f572ac25b4416a957be59f
|
|
| MD5 |
1cdd19ac3abad95bfff4085fd939d64a
|
|
| BLAKE2b-256 |
c7f62d22c31834d88b961233452acb09d5b0fbed7d50c3fde496d083c0f3f4f1
|