Skip to main content

Poetry plugin to export project dependencies as separate pip packages.

Project description

Poetry Package Exporter Plugin

Introduction

The Poetry Package Exporter is a plugin for the poetry package manager. It is designed to enhance the CI process by exporting project dependencies as separate pip-installable packages. By doing so, it allows you to leverage the existing Poetry cache, resulting in significantly shorter optimized build times.

Features

  • Dependency Exportation: Automatically exports your Poetry-managed dependencies into pip-installable packages.
  • Cache Re-utilization: Leverages Poetry's cache system to avoid redundant downloads, speeding up the Docker build process.

Installation

To install the Poetry Package Exporter plugin, run the following command in your terminal:

poetry plugin add poetry_plugin_export_packages

or

pip install poetry_plugin_export_packages

Ensure you have Poetry installed prior to adding this plugin. For instructions on installing Poetry, visit Poetry's documentation.

Usage

After installing the plugin, use the following command to export your dependencies:

poetry export-packages

This command will generate a set of pip-installable packages for your project's dependencies. You can then copy these packages into your Docker build context and use pip to install them during the Docker image build process.

Configuration

The plugin supports several configuration options to customize the export process.

$ poetry export-packages -h

Description:
  export python packages

Usage:
  export-packages [options]

Options:
  -o, --output-dir=OUTPUT-DIR          Directory to save packages to. [default: "export-packages"]
      --shebang=SHEBANG                Shebang to start the generated pip install script with [default: "#! /bin/sh"]
  -f, --output-script[=OUTPUT-SCRIPT]  Place to save output script to.
      --without=WITHOUT                The dependency groups to ignore. (multiple values allowed)
      --with=WITH                      The optional dependency groups to include. (multiple values allowed)
      --only=ONLY                      The only dependency groups to include. (multiple values allowed)
  -h, --help                           Display help for the given command. When no command is given display help for the list command.
  -q, --quiet                          Do not output any message.
  -V, --version                        Display this application version.
      --ansi                           Force ANSI output.
      --no-ansi                        Disable ANSI output.
  -n, --no-interaction                 Do not ask any interactive question.
      --no-plugins                     Disables plugins.
      --no-cache                       Disables Poetry source caches.
  -C, --directory=DIRECTORY            The working directory for the Poetry command (defaults to the current working directory).
  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.

Contributing

Contributions to the Poetry Dependency Exporter are welcome!

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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_packages-1.0.3.tar.gz (6.1 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_packages-1.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_export_packages-1.0.3.tar.gz.

File metadata

  • Download URL: poetry_plugin_export_packages-1.0.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1019-azure

File hashes

Hashes for poetry_plugin_export_packages-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1f4ee308a12d2cfc50a6aeeeb1ab9040e246e54f99f0dad3488cd9f8ff7970d9
MD5 0c7648c549eb3de0886384b833d17020
BLAKE2b-256 bf559a1f3f7be9c9628b2ccadb25cca7b4df49026c5d433595b58a9cb109c687

See more details on using hashes here.

File details

Details for the file poetry_plugin_export_packages-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_export_packages-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ce548529456a08eed90ed8d2d55a941899b7ac277a81bc4096205ecd9fb68eca
MD5 6c49a7f261857e0c727cc002181ed3ee
BLAKE2b-256 134adfc48cdd90484f5942d391937568452a896aa4ec55e56bc36cb21f719b7c

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