Skip to content

mgoulao/typy

Repository files navigation

typy

typy is a Python library for generating polished PDFs with Typst. It provides:

  • a typed Python API
  • a CLI for quick rendering workflows
  • reusable built-in templates (report, invoice, letter, CV, presentation, and more)

Warning

typy is still experimental and APIs may change between releases.

report invoice letter
report invoice letter
cv academic presentation
cv academic presentation

Install

pip install typy
# or
uv add typy

Quick start (CLI)

typy scaffold report --output data.json
typy render --template report --data data.json --output report.pdf

Quick start (Python)

from typy.builder import DocumentBuilder
from typy.templates import BasicTemplate

template = BasicTemplate(
    title="Hello typy",
    date="2026-04-24",
    author="Your Name",
    body="## Welcome\n\nThis PDF was generated from Python.",
)

DocumentBuilder().add_template(template).save_pdf("hello-typy.pdf")

Documentation

Published documentation website: mgoulao.github.io/typy

Source docs in this repository:

Examples

Runnable examples are in examples/:

Contributing and development

Contributor workflows (tests, linting, docs build, and release practices) are documented in DEVELOPMENT.md.

About

Generate beautiful PDF documents in Python using Typst.

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Contributors