Skip to main content

A Python typesetter for the reader.

Project description

Prose, a Python typesetter for the reader.

Rust1.97+ 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 facets 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, rules, server, cache, completions, and schema:

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 rules                    # list the rules in pipeline order
prose schema                   # print the config's JSON Schema
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 config. 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.8.2.tar.gz (561.9 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.8.2-py3-none-win_amd64.whl (2.9 MB view details)

Uploaded Python 3Windows x86-64

prose_formatter-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

prose_formatter-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

prose_formatter-0.8.2-py3-none-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prose_formatter-0.8.2-py3-none-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: prose_formatter-0.8.2.tar.gz
  • Upload date:
  • Size: 561.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2.tar.gz
Algorithm Hash digest
SHA256 310d7cbb3c6e257e90cb98f77b6caab12c3bdb63ecab3787a357e04dc40ae3e5
MD5 de3d2abea49c13d2ce3346672c9ea149
BLAKE2b-256 a8374ccfc5f78efe79ed1ea4d29fca0dbf459b6e43ad0f1f194eec86d5568200

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2.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.8.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: prose_formatter-0.8.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 dd9a0cffa2e7c806e30fd2dad5cbaa483ef74de756e7471be0e153750dc961d7
MD5 d15fd7846d84abd831072b06cedf3c1b
BLAKE2b-256 885189832a9cff5548433f0da854b71aedde5724b4bcb6c4567794c93510ffee

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2-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.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: prose_formatter-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8622ec4facc647df68840be7f4b6b644b482be19079629030b39ebf6e1d9b93
MD5 4694f835c900c9712b8a90c9d54ed914
BLAKE2b-256 369fa3de0adab8fe2dc456bab245e0427703434f7e053ad4e7394f908b166458

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2-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.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: prose_formatter-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ffdd715124c9efd485c954e8d022052bf7a8319e6654ec6268e753be24909a82
MD5 becca822d665997e1534e9b272d66240
BLAKE2b-256 7e93b4f2a0a48d1ea91d2301239547782095b9933347d96aaa526665241904fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2-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.8.2-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: prose_formatter-0.8.2-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 35e757f8bb7d55c7a3b567e355b1894e8da96cc37ec2fbc474dd1605f5d8bbba
MD5 2179561f3cc0e386f36a611d0263af70
BLAKE2b-256 3a80ed1f7b4d0711127c0c581e1a4ca8c49ed95dae7223c8f20c9d4cdeedf943

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2-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.8.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: prose_formatter-0.8.2-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.8.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ec976b96687a5e2b21df44a624c1c92b146ff0c4bb2b2fb4a73ac3fc636e19c5
MD5 4812f169f830e41dbe1c8a419f072d63
BLAKE2b-256 007ce1284ca33580d2198e75bfa2e1d4b1f963ed2187692c90379db553b0c9b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for prose_formatter-0.8.2-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