High-performance document generation API. Generate documents and reports from СSV, JSON, XML with 99,9% uptime and 24/7 monitoring.
Run this line from Terminal:
pip install blazingdocs
You can get your API Key at https://app.blazingdocs.com
client = BlazingClient('API-KEY')
account = client.get_account()
templates = client.get_templates()
usage = client.get_usage()
client = BlazingClient('API-KEY')
parameters = MergeParameters()
parameters.dataSourceType = DataSourceType.JSON # data in json format
parameters.sequence = False # data is object
parameters.strict = True # keep json types
with open('templates/PO-Template.json', 'r', encoding='utf-8') as f:
data = f.read()
with open('templates/PO-Template.docx', 'rb') as f:
file = FormFile('PO-Template.docx')
file.content = f.read()
operation = client.merge_with_form_file(
data=data,
filename='output.pdf',
parameters=parameters,
template=file
)
See more details here https://docs.blazingdocs.com