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
signature-layout  = false
alphabetize       = false
docstring-expand  = false
docstring-wrap    = false
blank-lines       = false
collection-layout = false
app.py
from pathlib import Path
from dataclasses import dataclass
@dataclass
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, full_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-trace-id": "abc-123"}
base_url = "https://example.com"
return {"url": f"{base_url}/{full_endpoint_url}"}

The Idea

Code, made legible.

The Surfaces

5 rule families. 22 rules.

All rules

The Workflow

Open with these few lines.

Install

Fetch the wheel and expose the prose binary.

bash
uv tool install prose-formatter

Configure

Drop a prose.toml at the project root, 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 pair with Ruff for the token-level surface Prose doesn't touch.

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