Skip to main content

A Python typesetter for the reader.

Project description

Prose, a Python typesetter for the reader.

Rust1.96+ Python3.10+ Coveragepercent DocumentationDocs


🪻 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, server, 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
prose server                   # language server over stdio

📰 Further Reading

The full edition lives at prose.fyi:


🗜️ 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

prose_formatter-0.5.0.tar.gz (699.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

prose_formatter-0.5.0-py3-none-win_amd64.whl (2.7 MB view details)

Uploaded Python 3Windows x86-64

prose_formatter-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

prose_formatter-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

prose_formatter-0.5.0-py3-none-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prose_formatter-0.5.0-py3-none-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file prose_formatter-0.5.0.tar.gz.

File metadata

  • Download URL: prose_formatter-0.5.0.tar.gz
  • Upload date:
  • Size: 699.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0.tar.gz
Algorithm Hash digest
SHA256 75d5aad2b11f272ac29d80451a8cd9ba0b3040ac101bdafcf181740bcf4acf5b
MD5 cc70195c03ab52eb385714091d8da2cb
BLAKE2b-256 98e11c81328390e0832a3b8da02c7fbe88afe42258a98a75feed638b0421f6ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0.tar.gz:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prose_formatter-0.5.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: prose_formatter-0.5.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8c3fa6ce62a3f479463c30b2e42b25ce4dd3c61ebecd63b7240879ed1b189257
MD5 5471d31b4878f9fd3a7f58614b63f96d
BLAKE2b-256 f04ad4f55fe670e2cbb351a60d51d2d6f11d87de3653fbdae10b1570e632e31a

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0-py3-none-win_amd64.whl:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prose_formatter-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: prose_formatter-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab0a2f5d7df8d9134b960c6dcfdd8b3e65210ccb82dc27116cfe47b6a34fd6c6
MD5 56285b22871640ac4248c227c135b04a
BLAKE2b-256 f3c57da45b865c2916c2caddef17912f9eedaaedced57841e15344f4b5e2ddfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prose_formatter-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: prose_formatter-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 94f7ede864c1b97250118b0a403130f7c0763c4a28d8a765b8af7d4fe671599b
MD5 e4fb80a1e811032853965594245112b4
BLAKE2b-256 d8c3af931d34356cec809ef026c0d1ac602cba98cf392a8cf10122cc210358c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prose_formatter-0.5.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: prose_formatter-0.5.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4aeae9069764dbfd518b74b4048505e0beb915231d301aac3fe612efb8cb0290
MD5 1f3ef04a56067b3237e5e64aa8106103
BLAKE2b-256 5bf8eb2ff20dec20fb35be056a60da78e09f0d9ce75d24590cc21cd9cb163108

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prose_formatter-0.5.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: prose_formatter-0.5.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for prose_formatter-0.5.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4b37341c2a564ea6609b100fcacb50b0267c6ccaac0e26289a29e108e964c3f7
MD5 4877f063fb023425b816f3786d88d4ec
BLAKE2b-256 dedb804a0b197d5c3e787b49ed5699998c28ddc0b5de5d85a7da91bcc9bdc192

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.5.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on Jybbs/prose

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page