Skip to content

Prose, a Python typesetter for the reader.

The Proof

From cramped to composed.

prose.toml
code-line-length      = 88
docstring-line-length = 76
target-version        = "3.13"

# Rules are on by default.
# All 'true' values are just for show.
[rules]
align-equals         = false
align-colons         = false
align-imports        = false
reflow-signatures    = false
alphabetize-siblings = false
expand-docstrings    = false
wrap-docstrings      = false
space-statements     = false
reflow-collections   = false
app.py
from pathlib import Path
from dataclasses import dataclass
@dataclass(kw_only=True)
class Config:
"""Connection knobs read at startup from the project's pyproject.toml, with command-line overrides applied last."""
timeout: int | None = None
name: str = "service"
debug: bool = False
def build_request(self, db: str, fully_qualified_endpoint_url: str, body: dict, timeout: int = 30, headers: dict | None = None,) -> dict:
"""Build a configured request with per-call overrides."""
headers_map = {"x-api-key": "secret", "accept": "application/json", "x-request-correlation-id": "abc-123"}
base_url = "https://example.com"
return {"url": f"{base_url}/{fully_qualified_endpoint_url}"}

The Idea

Code, made legible.

The Surfaces

6 rule families. 42 rules.

All rules

The Workflow

Open with these few lines.

Install

Install the wheel, which puts the prose binary on PATH.

bash
uv tool install prose-formatter

Configure

Write a prose.toml at the project root, a .config/prose.toml, or a [tool.prose] table in pyproject.toml. The defaults already work.

toml
target-version = "3.13"

Run

Rewrite in place, or check without writing.

bash
prose format path/
prose check path/

Compose

Optionally run Ruff too, for the token-level formatting Prose leaves alone.

bash
ruff format && prose format

Read on

Bring Prose to your own pages and make the next save legible.

uv tool install prose-formatter
Quick start