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.4.tar.gz (3.0 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.4-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for json2docx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e6dff0512cfee2aaf90db71bc096481b18130c00bf7461a4a7be21b162f05c19
MD5 9dfb9ddac4fc21a5b758db06c25074b6
BLAKE2b-256 b68534bee5905dd917e92c9a09a742f2525db2ec103b52cef6721a8bf06b075e

See more details on using hashes here.

File details

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

File metadata

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

Hashes for json2docx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0fcb1edc8cd5c813d6c1e221414ef0e656ff978c150a0d2d3cdaa2944450ba37
MD5 0a49fae45a657144e9b0f2aff3ce8dab
BLAKE2b-256 105513a2355100eed132b22d850b9cc3ec31bddd66d7a3a92607a81ede24f8db

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