Facilitate nox integration with uv for Python projects
Maintained. Last release 5 days ago, commits in 1 of the last 26 weeks. Weaker on commit activity.
pip install nox-uvIntro
nox-uv is a simple drop-in replacement for nox's @nox.session that
installs dependencies constrained by uv's lockfile.
Usage
Add nox-uv as a development dependency. The following example adds it into a nox
dependency-group.
uv add --group nox nox-uv
Using the following configuration within pyproject.toml as an example:
[dependency-groups]
nox = [
"nox-uv",
]
test = [
"pytest",
"pytest-cov",
]
type_check = [
"mypy",
]
lint = [
"ruff",
]
Within, your noxfile.py:
- Import
sessionfromnox_uv. - Set
venv_backendto"uv". This can be done globally usingoptions.default_venv_backend = "uv".