A Python typesetter for the reader.
Project description
🪻 About
Prose formats Python source to be legible at a glance. It aligns equals signs and colons vertically across consecutive lines, places one entry per line in dictionaries and lists, alphabetizes methods and fields within their groups, applies a singleton rule for colon padding, and treats code like prose rather than minified text.
[!NOTE] Prose is still pre-1.0. The rule catalog and configuration knobs continue to grow across release lines.
🗞️ Philosophy
Code is read far more often than it is written. A reader's eye moves down a page and across adjacent lines looking for parallels, patterns, and shape. When every = sits at a different column and every collection is compressed onto one line, that shape disappears, forcing the eye to slow down. Prose restores it, with aligned columns letting the eye skim, one-per-line collections making each entry a unit, and alphabetized groupings giving every reader the same landmarks.
The trade-offs minimalist formatters were built to avoid (wider diffs, more vertical scrolling, occasional re-alignment churn) no longer dominate the equation. Agentic assistants do much of the typing, and every modern code host offers whitespace-ignoring diffs. What remains is the daily experience of reading code.
🪄 Install & Usage
uv tool install prose-formatter
The binary exposes format, check, cache, and completions:
prose format path/ # rewrite files in place
prose check path/ # exit non-zero on violations
prose format --diff path/ # show the diff without writing
prose check --stdin < file.py # read from stdin
prose format - < file.py # `-` reads from stdin too
📰 Further Reading
The full edition lives at prose.fyi:
- The rule catalog walks every rule with before/after fixtures and per-knob configuration.
- The configuration reference covers the
prose.tomlandpyproject.tomlconfig files, every key, and the[rules]toggles. - The cache reference covers the cache directory,
--no-cache, the[cache]table, and theprose cachesubcommands. - The exit-code matrix is the contract CI gates and pre-commit hooks compile against.
- Suppression directives cover
# prose: off,# prose: skip, and the rest of the directive surface. - Composition with Ruff pairs the token-level formatter with
prose format. - Editor, pre-commit, and CI integrations wire Prose into the development loop.
🗜️ Development
Prose is a Rust crate that ships as a Python wheel through maturin, with mise managing the Rust toolchain, Python interpreter, and every supporting CLI through a single mise.toml. After installing mise and activating it in your shell, three commands provision the rest:
git clone https://github.com/Jybbs/prose.git
cd prose
mise install
mise tasks lists every available task, and mise ci runs the full local sweep that mirrors GitHub Actions.
For the architecture, the primitive surface walks every public type (Source, Pipeline, BindingAnalysis, SuppressionMap, RuleId, Edit), and the pipeline order explains how each rule reads a settled AST between reparses.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prose_formatter-0.3.0.tar.gz.
File metadata
- Download URL: prose_formatter-0.3.0.tar.gz
- Upload date:
- Size: 542.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da17b1fd247b9ed77b4edf6ccb620568a599530fd9f39e043432036f2053d4ad
|
|
| MD5 |
0d4358bf986928f8c8b8eb9c755eab6f
|
|
| BLAKE2b-256 |
feabe85bf0266069558e8c96867faf939811077892ae29b4cf94b1ccc569fa1b
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0.tar.gz:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0.tar.gz -
Subject digest:
da17b1fd247b9ed77b4edf6ccb620568a599530fd9f39e043432036f2053d4ad - Sigstore transparency entry: 1677199106
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file prose_formatter-0.3.0-py3-none-win_amd64.whl.
File metadata
- Download URL: prose_formatter-0.3.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e383fc1650fdb967cb610f8f8844d4314da5bc357c9a998654064924b2ccd4d5
|
|
| MD5 |
20977359b3a01741c7e242e34313f75c
|
|
| BLAKE2b-256 |
96e4869645343d0aef22631555e08b5db95c30ca32e0fb12144a33bcf1f6dd48
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0-py3-none-win_amd64.whl:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0-py3-none-win_amd64.whl -
Subject digest:
e383fc1650fdb967cb610f8f8844d4314da5bc357c9a998654064924b2ccd4d5 - Sigstore transparency entry: 1677199124
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file prose_formatter-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: prose_formatter-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65f82b3bca5cbd36690dc9182f4d51ce4aeadf7b1371c02fbee05c6d7fe8d52f
|
|
| MD5 |
373c4426a5f58295b07cce8d46cd8e8c
|
|
| BLAKE2b-256 |
323b79199267d3bfdf084aa74f6af6910a873c22fe693c34104e008cddc73ca8
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
65f82b3bca5cbd36690dc9182f4d51ce4aeadf7b1371c02fbee05c6d7fe8d52f - Sigstore transparency entry: 1677199151
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file prose_formatter-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: prose_formatter-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abff79ba949fbc0122b68c74230f4d66ccfb31f1c2e3fe235b064dcd0707773a
|
|
| MD5 |
10bc30c96204fcb871f42bd426ffc07f
|
|
| BLAKE2b-256 |
0a95136cc8f056be2b06cea80c0f4231cd18eb7eedb8679d2c9b83e478c97b2b
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
abff79ba949fbc0122b68c74230f4d66ccfb31f1c2e3fe235b064dcd0707773a - Sigstore transparency entry: 1677199113
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file prose_formatter-0.3.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: prose_formatter-0.3.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d5dc393ccf8cc0a5644e732fef4db05adddbaf991cccd07054b06e2c3dc873
|
|
| MD5 |
cc94a69b4944ac0a07564f13ac041614
|
|
| BLAKE2b-256 |
218f3d459bd52ca2b650a6416a8b138191c0ed3764cd1e5b06c5cc1446b3ffcd
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
c7d5dc393ccf8cc0a5644e732fef4db05adddbaf991cccd07054b06e2c3dc873 - Sigstore transparency entry: 1677199109
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file prose_formatter-0.3.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: prose_formatter-0.3.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b1f666b5a96047d0ab178f52ad48f8a56d17717f061c27ba07ff908cd24d58d
|
|
| MD5 |
ce0d0fb73f0454b0dccdb2f02a95c04c
|
|
| BLAKE2b-256 |
9fff94b3dcc98eedc4cb5ef2b08515c49b8b5061059fbaaa7bd192441e1e4206
|
Provenance
The following attestation bundles were made for prose_formatter-0.3.0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on Jybbs/prose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prose_formatter-0.3.0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
7b1f666b5a96047d0ab178f52ad48f8a56d17717f061c27ba07ff908cd24d58d - Sigstore transparency entry: 1677199128
- Sigstore integration time:
-
Permalink:
Jybbs/prose@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/Jybbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@386b713c299fa2558ff7d80fde141f0da7dfe7cb -
Trigger Event:
push
-
Statement type: