Fill Word document templates (contracts, forms) with structured data using docxtpl. Use when user uploads a .docx template with {{variables}} and provides data to fill it, or requests contract/form generation from template.
Automated contract and form filling using docxtpl library.
Be shure, that you recieve docx file. Don't try to read it.
scripts/extract_schema.py <template.docx> to get variables list and JSON schema. Don't read file. Just launch script.scripts/fill_template.py <template.docx> <data.json> <output.docx>/mnt/user-data/outputs/ and provide download link. Please don't read output file.{{VARIABLE_NAME}}pip install docxtpl --break-system-packages