Git Product home page Git Product logo

poetry_to_uv's Introduction

poetry-to-uv

Code style: Ruff

Helps convert a Poetry formatted pyproject.toml file to a UV formatted pyproject.toml file (also compatible with pip and pip-compile)

The rationale behind this library is to make it easier to unpin the dependencies specified in your pyproject.toml so when you use uv pip install -r pyproject.toml it will ensure you keep the same versions installed as did Poetry. Although you can manually export the resolved dependencies from Poetry, these will include ever single transient dependency, so it's really difficult to separate all of these out to ensure you only keep the existing deps.

Installation

uv pip install poetry_to_uv

Usage

usage: poetry_to_uv [-h] [--output-file OUTPUT_FILE] pyproject_path

Helps convert a Poetry formatted pyproject.toml file to a UV formatted pyproject.toml file (also compatible with pip and pip-compile). It will unpin all of your dependencies for you to ensure UV uses the exact same requirements, for your specified dependencies.

positional arguments:
  pyproject_path        Path to the Poetry formatted pyproject.toml file.

options:
  -h, --help            show this help message and exit
  --output-file OUTPUT_FILE
                        The output file to write the UV formatted pyproject.toml file. If not specified then it will print the results to the terminal.

Only meant as a helper to reduce some horrible BAU, especially if you've left all your dependencies unpinned!

Known Issues

  1. The new [project] settings are placed at the bottom of the file. So if you hate it, just as much as I do, then you'll have to manually move it to the top!
  2. We rely on poetry export still existing, but it's currently deprecated in v1.7 of Poetry. So if you have issues, make sure to install the Export Poetry Plugin.

poetry_to_uv's People

Contributors

pacificgilly avatar tony avatar

Stargazers

Sami El Achi avatar Jakub Janarek avatar

Watchers

 avatar Sami El Achi avatar

Forkers

tony

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.