Skip to main content

Poetry Dependency Juice Plugin

This plugin simplifies the process of managing dependencies in your Poetry projects by allowing you to mix dependencies from specified groups and wrap the poetry build command into poetry jbuild. It provides an easy way to create custom mixes of dependencies and execute the build command with those mixes.

See difference:

Poetry build:

poetry build && pkginfo -f requires_dist dist/*.whl

output:

Building poetry-plugin-deps-juice (0.0.2)
  - Building sdist
  - Built poetry_plugin_deps_juice-0.0.2.tar.gz
  - Building wheel
  - Built poetry_plugin_deps_juice-0.0.2-py3-none-any.whl
requires_dist: ['poetry (>=1.8.0,<2.0.0)']

Juice build:

poetry jbuild && pkginfo -f requires_dist dist/*.whl

output:

Mixing juice..
base -> poetry
        {'poetry-core': '^1.7.0', 'wheel': '^0.42.0'}
setup -> poetry
        {'build': '^1.0.3', 'setuptools': '^69.0.3'}
Building poetry-plugin-deps-juice (0.0.2)
  - Building sdist
  - Built poetry_plugin_deps_juice-0.0.2.tar.gz
  - Building wheel
  - Built poetry_plugin_deps_juice-0.0.2-py3-none-any.whl
requires_dist: ['build (>=1.0.3,<2.0.0)', 'poetry (>=1.8.0,<2.0.0)', 'poetry-core (>=1.7.0,<2.0.0)', 'setuptools (>=69.0.3,<70.0.0)', 'wheel (>=0.42.0,<0.43.0)']

Usage

  1. Installation:

    Install the plugin using Poetry:

    pip install poetry-plugin-deps-juice
    

    or

    pip install --user poetry-plugin-deps-juice
    

    or at least

    poetry self add poetry-plugin-deps-juice
    
  2. Define Dependency Mix:

    Add your dependency mix to the pyproject.toml file under the [tool.poetry-plugin-deps-juice] section:

    [tool.poetry-plugin-deps-juice]
    "fancy" = [
         "base",
         "setup",
    ]
    

    Here, poetry is the custom mix name, and base and setup are the groups of dependencies to be mixed.

    To mix into default group [tool.poetry.dependencies] use:

    [tool.poetry-plugin-deps-juice]
    "poetry" = [
         "base",
         "setup",
    ]
    
  3. Execute Juice Command:

    Now you can use the defined mix with Poetry:

    poetry jbuild
    

    This command will mix dependencies from the specified groups and execute the poetry build command.

    This is easier than manually merging all dependencies into one group or adding them manually to the [tool.poetry.dependencies] option. When installing the built package using pip, only dependencies listed in the [tool.poetry.dependencies] option are installed (in current time). This plugin simplifies the process by allowing you to create mixes on-the-fly for the final package.

  4. List Available Dependency Mixes:

    To get a list of available mixes along with their corresponding groups, run:

    poetry juice-list
    

    This will display a list of mixes and their associated groups:

    "poetry" <-
            "base"
            "setup"
    

Contributing

Feel free to contribute to this plugin by reporting issues, suggesting features, or submitting pull requests on GitHub.

License

This plugin is licensed under the Apache 2. License. See the LICENSE file for details.

Metadata

Release files for poetry-plugin-deps-juice 0.0.3

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-deps-juice 0.0.3
File Size Uploaded Provenance Actions
poetry_plugin_deps_juice-0.0.3.tar.gz 8.7 kB Without provenance Details for poetry_plugin_deps_juice-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for poetry-plugin-deps-juice 0.0.3
File Interpreter ABI Platform Actions
poetry_plugin_deps_juice-0.0.3-py3-none-any.whl Python 3 none any Details for poetry_plugin_deps_juice-0.0.3-py3-none-any.whl

Total release size: 18.3 kB

Release files / poetry_plugin_deps_juice-0.0.3.tar.gz

Download URL poetry_plugin_deps_juice-0.0.3.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ccf82221558df040a4a542a9b8488458122f884466e519095fb1d303b136b5bb
BLAKE2b-256 checksum
How to use checksums
b099a1f46b7953c053476df8bd03f7fa72edbf3094af4eff4942e68aa0fda684
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 PyPy/7.3.10 Linux/5.10.194-1-MANJARO-TKG

Release files / poetry_plugin_deps_juice-0.0.3-py3-none-any.whl

Download URL poetry_plugin_deps_juice-0.0.3-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dae95aa9b0723710397da08a3867048544404779722b6fb0a408d0c6404aa3a9
BLAKE2b-256 checksum
How to use checksums
ab6b18f44939d73ae062ede063fd89cd5665ad99b0e7ac7ac42f4d3df6867c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 PyPy/7.3.10 Linux/5.10.194-1-MANJARO-TKG

Security for poetry-plugin-deps-juice 0.0.3

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.

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