facturization
Generate high-quality PDF invoices from a YAML specification.
Background
I needed an invoice generator for my business with high quality typesetting, but I did not like any of the LaTeX templates I could find, and I wanted full control and greater flexibility compared to the projects I had seen. And so here we are.
Requirements
- A TeX distribution providing
pdflatex(e.g. TeX Live) with a few common packages:geometry,ragged2e,booktabs,tabularx,enumitem,hyperref, andbabel. These ship with a full TeX Live install.
Installation
Run it directly with uv:
uv run facturization path/to/input.yml --output-dir out/
Or install it as a standalone command-line tool:
uv tool install facturization
Pip is also supported:
pip install facturization
Usage
facturization path/to/input.yml
The only mandatory argument is the path to the input YAML file. --output-dir
(-o) defaults to the current directory. For an input named foo.yml the tool
writes foo.tex and foo.pdf (alongside pdflatex's .aux/.log) into the
output folder.
Example
Try out the example from the repo:
uv run facturization example/details.yml --output-dir example
This renders example/details.yml to example/details.pdf:
Input schema
Top-level keys
| Key | Required | Description |
|---|---|---|
invoice_number |
yes | Invoice identifier, shown in the header. |
issue_date |
yes | Date of issue. A YAML date is formatted like May 4, 2026. |
due_date |
no | Payment due date, formatted the same way. |
from |
yes | The sender party (see Party). |
to |
yes | The recipient party (see Party). |
service |
yes | The invoice line items (see Service). |
currency |
yes | Currency code shown next to the totals, e.g. EUR. |
separator |
yes | Decimal separator for amounts: dot or comma. |
payment |
no | Ordered mapping of label → value with payment instructions, rendered as a labelled list at the bottom. |
reverse_charge_note |
no | Footnote text used when any line sets reverse_charge. Default: VAT to be paid on a reverse charge basis. |
closingnote |
no | Free text printed at the very bottom; blank lines start new paragraphs. |
lang |
no | babel language for hyphenation and date/typography conventions, e.g. english. |
fontsize |
no | Base font size: 10pt (default), 11pt, or 12pt. |
geometry |
no | LaTeX geometry options for page size and margins. Default: a4paper, margin=18mm. |
Party
Used for both from and to.
| Key | Required | Description |
|---|---|---|
address |
yes | List of lines (name, street, city, country, …), printed as given. |
email |
no | Shown as e-mail. |
phone |
no | Shown as Phone. |
vat_identification_number |
no | Shown as VAT ID. |
company_registration_number |
no | Shown as Corp. reg. no. |
tax_code |
no | Shown as Tax code. |
Service
Each entry in the service list is one line item.
| Key | Required | Description |
|---|---|---|
description |
yes | Line description. |
unit_price |
yes | Price per unit. |
quantity |
no | Quantity, default 1. |
vat |
no | VAT rate in percent, default 0. |
reverse_charge |
no | If true, marks the line with a footnote and enables the shared reverse-charge note. |
details |
no | List of sub-bullets shown under the description. |
Development
Linting and type checking are handled by Ruff and
ty, configured in pyproject.toml. Both are part of the
dev dependency group, so uv sync installs them.
# Lint
uv run ruff check .
# Verify formatting (no changes written)
uv run ruff format --check .
# Apply auto-fixes and reformat
uv run ruff check --fix .
uv run ruff format .
# Type check (strict mode, all rules as errors)
uv run ty check .
Credits
Inspired by mrzool/invoice-boilerplate. This project takes the same idea of invoice typesetting from a plain data file, but replaces the heavy pandoc dependency with a small uv + Python + Jinja2 pipeline that renders a LaTeX template and compiles it with pdflatex.
License
Metadata
Release files for facturization 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| facturization-0.1.1.tar.gz | 131.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| facturization-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.5 kB
Release files / facturization-0.1.1.tar.gz
| Download URL | facturization-0.1.1.tar.gz |
|---|---|
| Size | 131.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af65ea9d835cf1da193220c5741cb173e6760b632e81a502b19c2324f6845aa5
|
|
BLAKE2b-256 checksum How to use checksums |
fcde99433b39286af33bfea46ac793b838089ee33f78b641910da013ccead805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / facturization-0.1.1-py3-none-any.whl
| Download URL | facturization-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cf180ba518b6869a2be050ab07ec48fc7a2d632f85b88980eabaaa52d3131f5
|
|
BLAKE2b-256 checksum How to use checksums |
39159d848e42286ed11beda3340d817e1ccc8f14a2876dc690fe0344ce1be315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency log