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 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, 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 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.6.0.tar.gz (490.5 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.6.0-py3-none-win_amd64.whl (2.8 MB view details)

Uploaded Python 3Windows x86-64

prose_formatter-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

prose_formatter-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

prose_formatter-0.6.0-py3-none-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prose_formatter-0.6.0-py3-none-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: prose_formatter-0.6.0.tar.gz
  • Upload date:
  • Size: 490.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0.tar.gz
Algorithm Hash digest
SHA256 aca3d785135eefd65310010c0a04b6ed6f6604b1810ac654c27aebaca8b06d2d
MD5 02c7aaff88f766b5989fc1b8271babc6
BLAKE2b-256 02e8b02f54604caded433bfffd8a1c5a5a22db9588c7ec1c98a26c54e4f27934

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.6.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7a11fe67e64f455d4f1dd15566183f4f979bc883445f426baf8e6c6b4304706e
MD5 549655bc7dc88747061f50e4edcb1e3f
BLAKE2b-256 fc9c648edc9d447b675bba44b3d2ed8be803ac87597e5096f486f037bd2dfdec

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce9d4b3f2b616438524fd1540e39d9f445eae445593d5dd2829d2768304a5328
MD5 0af9d2ec21db3f84a6c322bad2e0db7b
BLAKE2b-256 89d32f1309edaa3ac8237a82f9c21088fdaa243416bf61f8e1534d379f4410cd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c18037c23b893427d256803ce507b8603e7df8f472e91ac626c0c2f41bbcc99e
MD5 f4b2bfa7980e71118544f098e50dcacd
BLAKE2b-256 f38a58640770f982f8b11d8b1aeffe6678faf1b93af8b9ab5d0bcd8e1489737c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.6.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de99d4d629dd97b291200ac9535c213dcae66d8ad29e84bb1c6cf671e21e9577
MD5 e31010baf48b39d9b63abf5297918f4c
BLAKE2b-256 f608b2e7b944b21f37e408eb79f62fd71aac375ef7e9f3738b81a868802c1406

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.6.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.6.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 228cff34cfdbb725bdf0ce5528501b73247868e78bac6c48d6f27913961b7f60
MD5 7d968eccdb2c5d2276c437d0504f96f1
BLAKE2b-256 20f141eaa664a60af348f4b5869e48be7dfcc5987631ef1d3b7f44eaceab4bc3

See more details on using hashes here.

Provenance

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