Skip to main content

Poetry plugin to export the dependencies to various formats

Project description

Poetry Plugin: Export

Poetry

This package is a plugin that allows the export of locked packages to various formats.

Note: For now, only the constraints.txt and requirements.txt formats are available.

This plugin provides the same features as the existing export command of Poetry which it will eventually replace.

Installation

On Poetry 2.0 and newer, the easiest way to add the export plugin is to declare it as a required Poetry plugin.

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.8"

Otherwise, install the plugin via the self add command of Poetry.

poetry self add poetry-plugin-export

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

pipx inject poetry poetry-plugin-export

Otherwise, if you used pip to install Poetry you can add the plugin packages via the pip install command.

pip install poetry-plugin-export

Usage

The plugin provides an export command to export to the desired format.

poetry export -f requirements.txt --output requirements.txt

[!IMPORTANT] When installing an exported requirements.txt via pip, you should always pass --no-deps because Poetry has already resolved the dependencies so that all direct and transitive requirements are included and it is not necessary to resolve again via pip. pip may even fail to resolve dependencies, especially if git dependencies, which are exported with their resolved hashes, are included.

[!NOTE] The following formats are currently supported:

  • requirements.txt
  • constraints.txt
  • pylock.toml

Available options

  • --format (-f): The format to export to (default: requirements.txt). Additionally, constraints.txt and pylock.toml are supported.
  • --output (-o): The name of the output file. If omitted, print to standard output.
  • --with: The optional and non-optional dependency groups to include. By default, only the main dependencies are included.
  • --only: The only dependency groups to include. It is possible to exclude the main group this way.
  • --without: The dependency groups to ignore. (Deprecated)
  • --default: Only export the main dependencies. (Deprecated)
  • --dev: Include development dependencies. (Deprecated)
  • --extras (-E): Extra sets of dependencies to include.
  • --all-extras: Include all sets of extra dependencies.
  • --all-groups: Include all dependency groups.
  • --without-hashes: Exclude hashes from the exported file.
  • --with-credentials: Include credentials for extra indices.

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_export-1.10.0.tar.gz (36.8 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_export-1.10.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_export-1.10.0.tar.gz.

File metadata

  • Download URL: poetry_plugin_export-1.10.0.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for poetry_plugin_export-1.10.0.tar.gz
Algorithm Hash digest
SHA256 26ef9df924cd874a825d92d6bc01a5a869a4a28d2f2ebba61d3b5b19c60120f0
MD5 874ac283275141d1542d581ee387c581
BLAKE2b-256 b865b6101669aaa4e0efab9d6a634b1254ab1f66d12db9e8142f16f8e3a18911

See more details on using hashes here.

Provenance

The following attestation bundles were made for poetry_plugin_export-1.10.0.tar.gz:

Publisher: release.yaml on python-poetry/poetry-plugin-export

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file poetry_plugin_export-1.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_export-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9b61332718fb91c8d9399edb00fd73cf99de37506adf617fbdf55079bab223
MD5 19d2602ba53502b0d47b3b14f686d837
BLAKE2b-256 9cc604e2f2e2155d3a987b1e364150abfc1d6667c135cfd4894a23e1f5405558

See more details on using hashes here.

Provenance

The following attestation bundles were made for poetry_plugin_export-1.10.0-py3-none-any.whl:

Publisher: release.yaml on python-poetry/poetry-plugin-export

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