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.4.0.tar.gz (614.8 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.4.0-py3-none-win_amd64.whl (2.6 MB view details)

Uploaded Python 3Windows x86-64

prose_formatter-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

prose_formatter-0.4.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.4.0-py3-none-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prose_formatter-0.4.0-py3-none-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: prose_formatter-0.4.0.tar.gz
  • Upload date:
  • Size: 614.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0.tar.gz
Algorithm Hash digest
SHA256 adc19cf91f13a1702a28cc13c7b33bb3742575cbca39e2b21ca35ed2d2c8a5fa
MD5 58451ba08110bbcd9528e2c009f233cd
BLAKE2b-256 f9db8a6d3ecc07bc8b00e6569fba8b349d024779bc7ea3a068302fdff28d4eb5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2a39706c639bb2757840d1b2fe5e0076379a5720683b35b34067774d4b202946
MD5 c52c1c34f969c03f2703dba818bb43d6
BLAKE2b-256 65e787dea8de7270c420637724999a3ef5771aafc18a41b3ab32bfedc47da4b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c016fb1b3ae5045ec21db94179dc80a8510a667769149f1531959f0eb74ea9d
MD5 4f014765901427baba3a2b8db0f1a973
BLAKE2b-256 e826391cbed257a015956829754cb871404c26c559f395f18f38f53e89779943

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.4.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.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 03fda0cd07484198aefd57c6cb97f526482ca3778cda4725e62f23b5095f4d0e
MD5 420ca847a08349bd06f1f2f88bf0f46f
BLAKE2b-256 3a5c6aafad0a00e5311a8535358824b3e70ec1b34ba265a0313c94a5d008de29

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.4.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6260e564000f8584a68e221fa3fdccff8c59d6f0081e58ad1922fd8fc235b58d
MD5 65192701f0ff204773cee7d25f966f3e
BLAKE2b-256 467c0d0b19c406eb0e1bfa9fbcf76735fe1399d6e7f18e6c94d574c24d0b30fd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prose_formatter-0.4.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.4.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d2ad38fe0365eece03d5301f744a30bc763299976d02ef3ae194122991682625
MD5 40ddbb7f16b7a8aa778c643d2e5c7475
BLAKE2b-256 c0a629e990ea96dcfea825852dfbf1d81492886a336b4973b665135393ed1f34

See more details on using hashes here.

Provenance

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