Skip to main content

Poetry plugin to sort the dependencies alphabetically

Project description

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.

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

poetry_plugin_sort-0.3.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_plugin_sort-0.3.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_sort-0.3.0.tar.gz.

File metadata

  • Download URL: poetry_plugin_sort-0.3.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.11.11 Linux/6.8.0-1017-azure

File hashes

Hashes for poetry_plugin_sort-0.3.0.tar.gz
Algorithm Hash digest
SHA256 97729684efb52acc9b8f96bd45afef1c858ad1ab6eee26473914df0a18d3a84a
MD5 96b64d7fd958744664195ea611157b0b
BLAKE2b-256 343aeedebbbfb3845a06ae01e1aea3570fb44a98a05c473cd29ba4fa5db8a9ff

See more details on using hashes here.

File details

Details for the file poetry_plugin_sort-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: poetry_plugin_sort-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.11.11 Linux/6.8.0-1017-azure

File hashes

Hashes for poetry_plugin_sort-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e36576053d3a6c98bfb22abdf82515f27e3b95ee4f0dc491fc1254c26d399e26
MD5 52b74d212848432122bbb2fc0974a882
BLAKE2b-256 8e6ea2202bf69f833e2b15948453f4e5cd558b998a356ef4a72483baf168e1c0

See more details on using hashes here.

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