- Require a specific python version.
Reason: uv will check the python version in pyproject.toml and automatically download a version that fits the requirement.
- Create a virtual environment (especially with `venv`)
Reason: `uv run` and `uv sync` will both always create a virtual environment (unless specified otherwise) before installing dependencies.
- Enter the virtual environment.
Reasom: `uv run` and `uv sync` will both automatically invoke the previously created venv when running their commands.
- Install dependencies with `uv sync --locked`
Reason: `uv sync` will automatically sync to the locked state. Envoking `uv run flask run` will do the same.
So in short: You can save a ton of steps by simply running `uv run flask run`. That's the beauty of uv!