Skip to main content

platen

In a printing press, the platen presses paper against inked type.

Platen is a Python package and command-line tool that presses structured data into documents.

Requirements

  • Python 3.14 or later.

Installation

To install Platen as a package to use in your own Python project, install platen from PyPI with your package manager of choice and read the user guide.

To use platen as a command-line tool, install it via pipx:

pipx install platen

Usage

platen --template FILE \
       --values   FILE \
       --out      FILE \
       [--watch] [--serve]

platen --templates DIRECTORY \
       --values    FILE      \
       --out       DIRECTORY \
       [--watch] [--serve]

--template and --templates are the same option, so either one can name a file or a directory.

For example, say you have values in values.yaml:

name: Bob

And a Jinja template, hello.md:

# Hello, {{ name }}!

Press the values into the template:

platen --template hello.md --values values.yaml --out build/hello.md

Platen creates build/hello.md:

# Hello, Bob!

To press every template in a directory, name that directory with --templates and the directory to press into with --out:

platen --templates templates --values values.yaml --out build

To press again whenever the templates or values change, add --watch. Platen prints a line for every press, and keeps watching until you press Ctrl+C, even when a press fails:

platen --template hello.md --values values.yaml --out build/hello.md --watch

See Watching for changes in the user guide for what's watched, and what isn't.

To see your pages in a browser while you work, add --serve instead. Platen serves at http://localhost:1440/, re-presses when the templates or values change, and reloads open HTML pages automatically:

platen --templates templates --values values.yaml --out build --serve

See Serving with live reload in the user guide for what's served, and how.

Platen also gives templates built-in functions, like the time of the press.

Contributing

See Contributing in the user guide to set up the project and run its checks.

Metadata

Release files for platen 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for platen 0.8.0
File Size Uploaded Provenance Actions
platen-0.8.0.tar.gz 107.6 kB With provenance Details for platen-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for platen 0.8.0
File Interpreter ABI Platform Actions
platen-0.8.0-py3-none-any.whl Python 3 none any Details for platen-0.8.0-py3-none-any.whl

Total release size: 144.4 kB

Release files / platen-0.8.0.tar.gz

Download URL platen-0.8.0.tar.gz
Size 107.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b9dce35ce42498008820d21b92f5b87508bf2c5a4eef387ae457a31008741322
BLAKE2b-256 checksum
How to use checksums
f5aecab15ecba4c1aa8a8be3c060747c050bbcb1b8cb0f79128ad58834ca372d
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 Nov 19, 2026.

Transparency log

Release files / platen-0.8.0-py3-none-any.whl

Download URL platen-0.8.0-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b5998d8f31651e82cce45cdf34cad4a46b9acc2d1b279445ef33c1b73aea97d
BLAKE2b-256 checksum
How to use checksums
ce01cc2e3f1b8fb0d6b83319e6a430f84ef9e8a992b4c80789f87b071f6679b3
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 Nov 19, 2026.

Transparency log

Security for platen 0.8.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for platen-0.8.0.tar.gz

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 Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page