pyproject-fmt-py
A pyproject.toml formatter written in pure Python, reimplementation of pyproject-fmt.
Installation
# mise via github release
mise use -g github:eggplants/pyproject-fmt-py
# mise via pipx
mise use -g pipx:pyproject-fmt-py
# pipx
pipx install pyproject-fmt-py
# pip
pip install pyproject-fmt-py
Docker
docker pull ghcr.io/eggplants/pyproject-fmt-py
docker run --rm -v "$PWD:/w" -w /w ghcr.io/eggplants/pyproject-fmt-py pyproject.toml
CLI
$ pyproject-fmt pyproject.toml
--- pyproject.toml
+++ pyproject.toml
@@ -1,3 +1,3 @@
[project]
-name="My_Package"
-dependencies=["b","a >= 1.0.0"]
+name = "my-package"
+dependencies = [ "a>=1", "b" ]
$ pyproject-fmt --check pyproject.toml # fail without writing
$ pyproject-fmt --stdout pyproject.toml # write the result to stdout
$ cat pyproject.toml | pyproject-fmt - # read from stdin
Settings
[tool.pyproject-fmt]
column_width = 120
indent = 2
# "long" writes each sub-table under a header of its own
table_format = "short"
# true keeps a redundant `.0` in a dependency version
keep_full_version = false
max_supported_python = "3.15"
Library
from pyproject_fmt_py import Settings, format_toml
print(format_toml('[project]\nname="My_Package"\n', Settings()))
format_toml raises FormatError when the source is not a document, or
says something the rules reject, such as a project.version does not read.
License
Metadata
Release files for pyproject-fmt-py 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyproject_fmt_py-0.0.2.tar.gz | 80.6 kB | Without provenance | Details for pyproject_fmt_py-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyproject_fmt_py-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for pyproject_fmt_py-0.0.2-py3-none-any.whl |
Total release size: 180.8 kB
Release files / pyproject_fmt_py-0.0.2.tar.gz
| Download URL | pyproject_fmt_py-0.0.2.tar.gz |
|---|---|
| Size | 80.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c88c03f21bba31020c6697ce98e88523eb3afafd8ced3ddc46c2c5d6680c2df
|
|
BLAKE2b-256 checksum How to use checksums |
d2a858ad6938e0b9fa409b32056dfed33e6b5055970fa00b8905b04d9a8e62ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyproject_fmt_py-0.0.2-py3-none-any.whl
| Download URL | pyproject_fmt_py-0.0.2-py3-none-any.whl |
|---|---|
| Size | 100.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b5eea80eccdfd88809cd2c68a36030725ddccce1bb6eba9366fc2a42008751d
|
|
BLAKE2b-256 checksum How to use checksums |
cf0f543154d95aef3fcfd242c7de650ff882c74e405164747846a8f96730f70a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pyproject-fmt-py 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.