Is there a way to programmaticaly generate documents?

While you can use a templating engine like Jinja, personally I would suggest moving the templating to Typst itself. The mixing of markup and code that Typst allows is designed to support exactly that. The post Can I configure my document (e.g. draft/release version, light/dark theme) when creating a PDF without modifying the Typst file directly? imo covers this topic (“rendering different data, serial letter style”)

Combine data loading with a Python library like the one @Tinger mentioned, this should get the job done.

2 Likes