Migrate your project from poetry to uv

Migration

This is small poetry -> uv migration guide that should get most people started.

  1. Run uvx:

    uvx pdm import pyproject.toml

  2. Remove all poetry sections in the pyproject (i.e. [tool.poetry...] sections)

  3. Replace

    [tool.pdm.dev-dependencies] dev = [

    with

    [tool.uv] dev-dependencies = [

Done. Your pyproject.toml file is now compatible with UV and you can do uv lock or uv sync.

Dockerfile trick

Useful trick from ColiVarE's Dockerfile: if you want uv in a container you can install it with this one-liner:

COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

links

social