Hacker News new | ask | show | jobs
by wanderlust123 61 days ago
I am not following the difficulties you have mentioned. Setting up a local dev environment in Python is trivial with UV.

The only major downside of Python is its got a bit poor module system and nothing as seamless as Cargo.

Beyond that the code is a million times easier to understand for a web app.

1 comments

Again, "easy" is not the same as "simple".

"trivial" falls in the "easy" category. So it may not be hard to do. But what UV makes "easy" is managing something very complex under the hood.

Better example:

FROM python:3.9-slim

WORKDIR /app

COPY requirements.txt .

RUN pip install -r requirements.txt

COPY . .

CMD ["python", "app.py"]

While "easy" it is nowhere near simple. Aside from the entire complexity of the stack of docker, that `python:3.9-slim` it itself is very complex. It installs over 20 "dev" packages (from bluetooth via tk to xz), it downloads source files, builds a python runtime, (patches that?), installs pip, setuptools, does some (to python people probably familiar?) "wheel" stuff, etc¹. Point being: what you end up with, while easy to get, is very complex.

uv manages a runtime, some virtual environment to hot-swap that with other runtimes, it hooks into a package manager, manages additional tools (linter, typechecker, lsp, etc) and so on. What lies under that is very complex.

¹ I am well aware that node, ruby, php are quite similar.