nox-poetry
nox-poetry
What it is and what it does
nox-poetry is a drop-in replacement for Nox's @session decorator and Session object that makes Nox respect Poetry's lock file when installing packages. Instead of letting pip resolve dependencies fresh each time, it exports Poetry's constraints and uses them to pin versions during installation, ensuring reproducible and deterministic test runs across environments and CI systems.
The package works by intercepting session.install() calls and passing them through Poetry's export mechanism, which generates a constraints file that pip then uses. When you install your own package (via session.install(".")), nox-poetry builds a wheel using Poetry first, then installs that wheel. This approach avoids the pitfalls of editable installs while keeping each session's environment minimal—you only get the dependencies each tool actually needs.
Use it for:
- Run tests across Python versions with dependencies pinned by Poetry's lock file, ensuring CI and local results match.
- Install development tools as Poetry dev dependencies and use them in isolated Nox sessions without the full dependency tree.
- Build and test a wheel installation in Nox rather than an editable install, catching packaging mistakes before release.
- Manage reproducible checks across a team by centralizing dependency versions in Poetry's lock file.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Poetry's lock file into Nox sessions, allowing session.install() to install packages at versions pinned by Poetry rather than resolving them fresh each time.
Yes. If you use both Poetry and Nox, this package solves a real problem—making Nox respect your lock file so that session dependencies are reproducible and deterministic. Low install friction, active maintenance, no known vulnerabilities, and permissive license. The only gotcha is the installation requirement (must be in the same environment as Nox, and Poetry >= 1.0.0 must be on your system), which is documented and straightforward.
Install
nox-poetry on PyPI
pip
pip install nox-poetryuv
uv add nox-poetrypoetry
poetry add nox-poetryInstalling nox-poetry
Before you install
Low friction: pure Python wheel with four straightforward runtime dependencies (build, nox, packaging, tomlkit). Must be installed into the same environment as Nox itself—if using pipx for Nox, inject it via pipx inject rather than pip install. Active maintenance with recent release.
License in practice
MIT permissive license; you can use, modify, and distribute this package freely in commercial and private projects without restriction.
Quickstart
pip install nox-poetry
from nox_poetry import session
@session(python=["3.10", "3.9"])
def tests(session):
session.install("pytest", ".")
session.run("pytest")
Requires Poetry >= 1.0.0 installed on your system and Python >= 3.9. In Poetry >= 2, poetry-plugin-export must be declared as a required plugin in pyproject.toml.
Verify before relying
- Whether session.poetry utilities (installroot, build_package, export_requirements) are stable or subject to breaking changes.
- Performance impact of Poetry export and wheel-building on session startup time for large projects.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — build, nox, packaging, tomlkit |
| Maintenance | actively maintained — 535 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,609/month — #11,584 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nox_poetry-1.2.0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
nox-uvnox-uv replaces nox's standard session…
permissive · top 15,000 on PyPI
poetryPoetry is a dependency management and packaging…
permissive · top 1,000 on PyPI
poetry-plugin-exportExports Poetry's locked dependency tree to…
permissive · top 1,000 on PyPI
poetry-plugin-shellA Poetry plugin that launches a subshell with…
permissive · top 15,000 on PyPI
noxNox automates testing across multiple Python…
permissive · top 5,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
pip-upgraderAn interactive CLI tool that upgrades Python…
permissive · top 15,000 on PyPI
migrate-to-uvAutomates migration of Python projects from…
permissive · top 15,000 on PyPI
pdm-build-lockedA pdm plugin that includes locked dependency…
permissive · top 5,000 on PyPI
charmcraftlocalPacks Juju charms with local Python package…
unclear · top 15,000 on PyPI