A webservice for creating Microsoft Word documents from templates.
500K+
A dockerized webservice for creating Microsoft Word documents from templates.
sablon uses the Ruby Gem sablon for document creation. It exposes an endpoint for uploading a .docx template and a JSON context. The webservice is written in Python using the aiohttp web server.
To start the webservice just run
docker-compose up
The .docx template and the JSON context must be uploaded as multipart/form-data
with a parts named template and context.
Example:
curl -F "template=@tests/template.docx" -F "context=@tests/context.json" http://localhost:3000/
To execute the tests, Python 3.8 with pytest and requests is required.
python3.8 -m venv venv
./venv bin/activate
pip install pytest requests
Tests are run by executing pytest:
pytest
Content type
Image
Digest
sha256:0fc79984e…
Size
28.2 MB
Last updated
about 2 years ago
docker pull 4teamwork/sablon