Skip to main content

Poetry Plugin: Dependencies sorting

PyPI Version Python Versions check

This package is a plugin that sort dependencies alphabetically in pyproject.toml after running poetry init and poetry add. Since Introduce dependency sorting #3996 pull request still open this plugin is a workaround for !312 issue.

Installation

Just use poetry self add command to add this plugin.

poetry self add poetry-plugin-sort

If you used pipx to install Poetry, add the plugin via pipx inject command.

pipx inject poetry poetry-plugin-sort

And if you installed Poetry using pip, you can install the plugin the same way.

pip install poetry poetry-plugin-sort

Usage

The plugin sorts dependencies each time when you change dependencies via the poetry init and poetry add commands.

To sort dependencies without making changes to the dependencies list, the plugin provides a sort command.

poetry sort

Available options

  • --check: Checks if dependencies are sorted and exits with a non-zero status code when it doesn't.

Configurations

The following configuration can be set in [tool.poetry-sort] section of the pyproject.toml file or as system-wide environment variables:

  • enabled \ POETRY_SORT_ENABLED: Enable or disable sorting after invoking poetry init and poetry add commands. Default: True.
  • move-optionals-to-bottom \ POETRY_SORT_MOVE_OPTIONALS_TO_BOTTOM: Move optional packages to the bottom. Default: False.

Metadata

Release files for poetry-plugin-sort 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poetry-plugin-sort 0.3.0
File Size Uploaded
poetry_plugin_sort-0.3.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poetry-plugin-sort 0.3.0
File Interpreter ABI Platform
poetry_plugin_sort-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / poetry_plugin_sort-0.3.0.tar.gz

Download URL poetry_plugin_sort-0.3.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
97729684efb52acc9b8f96bd45afef1c858ad1ab6eee26473914df0a18d3a84a
BLAKE2b-256 checksum
How to use checksums
343aeedebbbfb3845a06ae01e1aea3570fb44a98a05c473cd29ba4fa5db8a9ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.11.11 Linux/6.8.0-1017-azure

Release files / poetry_plugin_sort-0.3.0-py3-none-any.whl

Download URL poetry_plugin_sort-0.3.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e36576053d3a6c98bfb22abdf82515f27e3b95ee4f0dc491fc1254c26d399e26
BLAKE2b-256 checksum
How to use checksums
8e6ea2202bf69f833e2b15948453f4e5cd558b998a356ef4a72483baf168e1c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.0 CPython/3.11.11 Linux/6.8.0-1017-azure
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page