#!/bin/env python3 import json import typst data_string = """{ "id": "03711", "distribution": "Debian", "version": "12", "cpu": "i7 4352", "memory": "16GB", "disk": "8tb" } """ data = data_string print(data) j = json.loads(data) print(f"JSON:{j} {type(j)}") d = {"computer": json.dumps(j)} print(f"data:{d} {type(d)}") res = typst.compile(input="../src/main.typ", sys_inputs=d) with open("demofile.pdf", "wb") as f: f.write(res)