Question presented to candidate: "A lot of teams moved their Python projects to uv over the last two years. What is uv, what does it replace, and why are people switching from pip, pip-tools and Poetry? Are there reasons not to?"
What a strong answer should cover:
- uv is a single Rust binary from Astral that covers installing packages (
uv pip), creating venvs, locking and syncing projects (uv add,uv lock,uv sync,uv run), running tools (uvx), running single-file scripts with inline metadata (PEP 723) and installing Python itself (uv python install) - Speed comes from a Rust resolver, parallel downloads and a global cache that installs by cloning or hard-linking files into each venv; warm-cache operations take milliseconds
- Projects are standards-based:
[project]inpyproject.toml, PEP 735[dependency-groups], and a cross-platformuv.lockcommitted to git;uv runkeeps the venv in sync automatically - Compared with pip: pip installs into an environment but has no project lockfile workflow (an experimental
pip lockarrived in pip 25.1); compared with Poetry: similar workflow, but uv also manages Python versions and tools, and is much faster - Trade-offs and context:
uv.lockis uv-specific (it can exportrequirements.txtor PEP 751pylock.toml), pip remains the default installer that ships with Python, and the company behind uv is being acquired by OpenAI (announced March 2026), with a stated commitment to keep it open source
Clarifying questions expected:
- Is this an application (lockfile matters) or a library published to PyPI (ranges matter)?
- What does the team use today, and does CI or deployment depend on
requirements.txt?
Code / implementation expected: Optional โ the basic uv init / uv add / uv run workflow, or a PEP 723 script header.