Corey Schafer’s UV Video
Some tricks I picked up from the video
uv init new_directory[automatically creates a git repo, with a python .gitignore]- can then create github repo with
gh auth login;gh repo create <repository-name> --public --source=. --push
- can then create github repo with
- Even if the .venv isn’t there, uv run myscript.py will create the .venv from the pyproject.toml file and install the dependencies.
uv sync[updates the .venv with the latest dependencies from pyproject.toml]uv add -r requirements.txt[adds the requirements from a requirements.txt to the pyproject.toml file - can then delete requirements.txt]uv tool install ruff[installs ruff in isolated env but makes available on the PATH]uv tool run ruff check .[installs and runs ruff in a temporary isolated environment]uvx ruff check .[shortcut for the above command]