Skip to main content

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 .docx paragraphs 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.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json2docx-0.1.1-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file json2docx-0.1.1.tar.gz.

File metadata

  • Download URL: json2docx-0.1.1.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

Hashes for json2docx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0fa32cfd61e37e1d04527f096a2fb4f0464281edb43a94c75169287b769a69e2
MD5 33cb84a9993dd28d38dc1c369f6ce33a
BLAKE2b-256 86388094a8b931135240e4fa29c441491a018b926db15f168a628f2d698cbd91

See more details on using hashes here.

File details

Details for the file json2docx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: json2docx-0.1.1-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

Hashes for json2docx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a444a5d57e44ffa0d6450d950f4149b25ba1162d8d7ac5021568ec0fa9d224f
MD5 418bb8099c6cf4ed9ef45e9281f6d9f1
BLAKE2b-256 5928ce59698837efa8fe7b95f88cf0d37ab8b0bddbe0856beb1a00ebc68d3bc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page