Quick facts
- Similar to
poetryAPI - Python compliant
- Uses
.python-versionlikepyenv - Uses
pyproject.tomllikepip - Uses
.venvas default
- Uses
pyproject.tomlgoverneduv venvequivalent topython -m venv .venvuv pip ...equivalent topip ...- Easy and quick installation
curl -LsSf https://astral.sh/uv/install.sh | sh- Upgrade with
uv self update

Note: Screenshot comparing
poetry(top) anduv(down). You can see the different implementations of thepyproject.tomland the performance (15s vs 1s).
Development
Common tasks we will find and use:
- Minimal scaffolding
- Manage venv/dependencies
- Manage Python versions
- Build distributions
Example
| |
Resources:
- https://docs.astral.sh/uv/getting-started/features/
- https://docs.astral.sh/uv/guides/projects/
- https://docs.astral.sh/uv/concepts/python-versions/#adjusting-python-version-preferences
- https://docs.astral.sh/uv/guides/integration/docker/
They Move Fast and Stick to the Standard
They have an amazing philosophy of using built-in Python tools. An example of
this, previously, they used the [tool.uv] table inside the pyproject.toml
like this:
| |
to handle dev dependencies, now (uv 0.5.4 (c62c83c37 2024-11-20)) they
replaced that in favor of dependency groups, becoming something like this:
| |
[!NOTE]
uvadopted the PEP-735: dependency groups in pyproject.toml in only 15 days. https://github.com/astral-sh/uv/issues/8090
Do you realize how great this is? Before, you were only able to install dev
dependencies using uv, but after the change, you can use whatever tool you
want, as long as they are Python-compliant, like pip.
How to Upgrade Only One Dependency
https://docs.astral.sh/uv/guides/projects/#managing-dependencies
To upgrade a package, run uv lock with the
--upgrade-packageflag:
uv lock --upgrade-package requestsThe
--upgrade-packageflag will attempt to update the specified package to the latest compatible version, while keeping the rest of the lockfile intact.
Running commands
| |
How to migrate
You probably already have most of the files needed and use pip:
setup.pypyproject.toml- be sure you have a
requires-pythonentry or.python-version
- be sure you have a
requirements.txt
I would recommend fully migrate
setup.pytopyproject.toml.
In that case, you can use the following commands:
uv venvuv pip install -r requirements.txtsource .venv/bin/activatepython -V
In case you want to switch to pure uv management you can try this:
uv add -r requirements.txtgit add uv.lock pyproject.tomluv syncfrom now on
To move from poetry to uv, use the requirements.txt standard to migrate
dependencies:
poetry export --without-hashes -o requirements.txtuv add -r requirements.txtpoetry export --dev --without-hashes -o requirements-dev.txtuv add -dev -r requirements-dev.txtgit add uv.lock pyproject.toml- remove poetry tables from
pyproject.toml