# typy > # 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](examples/report/report.py) | [invoice](examples/invoice/invoice.py) | [letter](examples/letter/letter.py) | > | **cv** | **academic** | **presentation** | > | [cv](examples/cv/cv.py) | [academic](examples/academic/academic.py) | [presentation](examples/presentation/presentation.py) | > > ## Install > > ```bash > pip install typy > # or > uv add typy > ``` > > ## Quick start (CLI) > > ```bash > typy scaffold report --output data.json > typy render --template report --data data.json --output report.pdf > ``` > > ## Quick start (Python) > > ```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](https://mgoulao.github.io/typy/) > > Source docs in this repository: > > - [Getting started](https://mgoulao.github.io/typy/getting-started.html) > - [Cookbook](https://mgoulao.github.io/typy/cookbook.html) > - [Template reference](https://mgoulao.github.io/typy/templates.html) > - [CLI reference](https://mgoulao.github.io/typy/cli.html) > - [API reference](https://mgoulao.github.io/typy/api.html) > - [Package format](https://mgoulao.github.io/typy/package-format.html) > - [LLM-oriented docs](https://mgoulao.github.io/typy/llm.html) > > ## Examples > > Runnable examples are in [examples/](examples/): > > - [basic](examples/basic/basic.py) > - [report](examples/report/report.py) > - [invoice](examples/invoice/invoice.py) > - [letter](examples/letter/letter.py) > - [presentation](examples/presentation/presentation.py) > - [academic](examples/academic/academic.py) > - [cv](examples/cv/cv.py) > > ## Contributing and development > > Contributor workflows (tests, linting, docs build, and release practices) are documented in [DEVELOPMENT.md](DEVELOPMENT.md). ## Pages - [typy](index.html.md):
- [API reference](api/index.html.md): | Module | Description ... - [builder](api/builder.html.md): Bases: `object` - [CLI reference](cli.html.md): The CLI is workflow-oriented and supports direct discovery through `--help`. - [content](api/content.html.md): Bases: `Encodable` - [Cookbook](cookbook.html.md): Each entry is designed so an LLM can copy, adapt, and run it directly. - [functions](api/functions.html.md): Bases: `Encodable` - [Getting started](getting-started.html.md): This page gets you from zero to your first PDF with both CLI and Python API. - [LLM-oriented usage](llm.html.md): Use these pages as machine-readable entry points. - [markup](api/markup.html.md): Bases: `Encodable`, `ABC` - [RFC: .typy template package format and manifest v1](package-format.html.md): This document defines the portable template package format used by typy. - [Template reference](templates.html.md): typy ships seven built-in templates, all sharing a consistent colour palette - [templates](api/templates.html.md): Bases: `BaseModel` - [typst_encoder](api/typst_encoder.html.md): Bases: `object` --- For more comprehensive documentation, see [llms-full.txt](llms-full.txt)