Skip to content
Edit this page View source of this page

uv

uv initializes Python projects, manages Python dependencies and environments, and runs commands inside those environments. The project initialization guide shows how to choose an app, library, script, or workspace layout.

Configuration in this template

mise declares the uv executable. The template starts without a Python project manifest or lockfile. Once you initialize a project, pyproject.toml holds declared dependencies and the supported Python range, and uv.lock records the dependency resolution for the repository.

The Prek hook suite checks lockfile freshness on relevant root configuration files. When a root uv.lock is checked, the configured export hook can write requirements.txt. The mise task sync runs uv sync --upgrade and can update the resolution.

Use the project's environment

After creating or adding dependencies to a project, run the commands from its root. After a teammate has committed uv.lock, use the locked sync shown below to set up your environment and detect stale dependency metadata.

uv sync --locked
uv run python --version

Give runtime and development dependencies separate entries. For example, uv add httpx adds a runtime dependency and uv add --dev pytest adds a development dependency. Review the manifest and lockfile changes together. Manage Python dependencies ยท uv project documentation