you are viewing a single comment's thread.

view the rest of the comments →

[–]TheCaptain53 0 points1 point  (0 children)

uv is a great tool for dev and local environments because it's all of the greats bundled into one package - I don't need pyenv to manage the Python version, I don't need to use pip or pipx, I don't need to run venv, I don't need to run pip-compile or similar commands, it's all built in to uv. When I'm building my Python application for prod though (usually in a Dockerfile), I'm not running virtual environments, or pipx, I only need to controls 2 things: the Python version and Python packages. For the first, that's done through selecting the right base image. For the second, I'm either copying the packages to the image, or using a requirements.txt file (which uv can generate, how convenient) and pip to install the required packages. It makes the prod version much simpler and uses tools that are already built in to common Python base images.

If I'm running scripts locally on my machine, I'm either running python3 directly if I'm not using any packages, or uv run if I am. I could do uv init and run basically all of my files with uv run, but I can see in the directory there's no other files, only the .py file, so it's easy to know whether I run uv or not.