Skip to main content

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.

Release files for poetry-to-uv 0.0.4

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-to-uv 0.0.4
File Size Uploaded
poetry_to_uv-0.0.4.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poetry-to-uv 0.0.4
File Interpreter ABI Platform
poetry_to_uv-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / poetry_to_uv-0.0.4.tar.gz

Download URL poetry_to_uv-0.0.4.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f65bc5304c3772268a733d48a6a52d7e0f488e3da4535f41c313ae48c1441570
BLAKE2b-256 checksum
How to use checksums
86b7eb258c20f6439073c541b553232f027201a2c5a1fc9fab0b2914f6d88ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / poetry_to_uv-0.0.4-py3-none-any.whl

Download URL poetry_to_uv-0.0.4-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe97110252c574ea1cf20307169005a4818d264a8b26d54c28fa8f6938542eff
BLAKE2b-256 checksum
How to use checksums
56d6dae91b197c698c09a80c1fbf3d66aa49045a318106fe0bb7004fe9137376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

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