poetry-sort
poetry-sort is a Poetry plugin that alphabetically sorts the dependencies in
your pyproject.toml file.
Installation
poetry self add poetry-sort
Usage
poetry sort
poetry sort supports the --with, --without, and --only options, which function identically to poetry install.
For full usage information, run poetry sort --help.
poetry-sort runs automatically whenever you run poetry add or poetry init and will sort only the dependency
groups that were modified by the command.
Configuration
You can configure poetry-sort via the tool.poetry.sort section of pyproject.toml.
[tool.sort.config]
auto = true
case-sensitive = false
sort-python = false
format = true
The following options are available:
-
auto(bool, default:true): Whether or not to automatically sort dependencies when runningpoetry addorpoetry init.poetry sortcan always be run manually, regardless of this setting. -
case-sensitive(bool, default:false): Whether to take case into account when sorting. -
sort-python(bool, default:false): Whether to also sort thepythondependency. Iffalse, thepythondependency will be placed at the top oftool.poetry.dependencies; iftrue, it will be sorted alphebetically with everything else. -
format(bool, default:true): Whether to apply some basic formatting topyproject.tomlafter sorting. Iftrue, poetry-sort will :take all occurences of three or more consecutive newlines inpyproject.tomland replace them with two newlines.
License
poetry-sort is licensed under the MIT License.
Metadata
Release files for poetry-sort 2.0.0
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 |
|---|---|---|---|---|
| poetry_sort-2.0.0.tar.gz | 4.7 kB | Without provenance | Details for poetry_sort-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| poetry_sort-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for poetry_sort-2.0.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / poetry_sort-2.0.0.tar.gz
| Download URL | poetry_sort-2.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69f5b6387956c5fd462946d4e5e0fb1ab8dec4f14b6415dcc4eb7202a6333897
|
|
BLAKE2b-256 checksum How to use checksums |
286817dffe21a7cc2b822b5e090e4dfbcc16cce60fe6ea5332f10c4e3aa9da65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1033-azure
|
Release files / poetry_sort-2.0.0-py3-none-any.whl
| Download URL | poetry_sort-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ed02e5428008f9a11e7687d03bf5badb02aec59ac9ddaee347da81e891b125d
|
|
BLAKE2b-256 checksum How to use checksums |
3b5279179537d709b0f5e6431e8114f0d06770f7845a69f515e8fdcc44b4b0a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1033-azure
|
Security for poetry-sort 2.0.0
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.