Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

uv

uv add
uv tree

Install uv

Install uv

Start a new Python project with uv

Go to the parent folder of where you’d like to create your project and type in:

$ uv init first

This will create a subfolder called first and 3 files in it:

  • An empty file callde README.md.
  • A sample python program called main.py.
  • The initial project config file called pyproject.toml

GitHub Action with uv

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
           enable-cache: true
           cache-dependency-glob: "**/requirements.txt"