Skip to content

Dependencies with uv

Trak uses uv with pyproject.toml and uv.lock.

  • pyproject.toml defines dependency groups.
  • uv.lock pins versions and should not be edited by hand.

Add or remove packages

# native
uv add <package>
uv remove <package>

# docker
make uv add <package>
make uv remove <package>

If you use Docker, rebuild containers after changes:

make build
make restart

make requirements also syncs uv.lock and rebuilds containers.

Upgrade packages

# native
uv lock --upgrade-package <package>
uv sync --upgrade-package <package>

# docker
make uv "lock --upgrade-package <package>"

Upgrade everything:

uv lock --upgrade
uv sync --upgrade