API Reference
Nox
A flexible Python automation tool using plain Python files to define sessions for testing and linting.
Official Documentation ↗CompatibilityThis documentation covers version
v2026.10.20. Check the official docs for the latest API surface.Installation
pip
pip install noxMethods
No methods match this filter.
Nox reads noxfile.py, builds sessions in virtualenvs, and runs their Python functions.
Key Features
- Sessions defined in Python
- Parametrized Python versions
- Virtualenv isolation per session
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
API reference evidence
Fetched from official sources on 2026-11-08T17:50:40+08:00 via WebFetch https://nox.thea.codes/en/stable/config.html.
@nox.session→ signature from https://nox.thea.codes/en/stable/config.html; official text: “session(func: Callable[…, Any] | Func | None = None, /, python: Python | None = None, py: Python | None =None, reuse_venv: bool | None = None, name: str |None = None, venv_backend: str | None = None, venv_params: Seque”session.run→ signature from https://raw.githubusercontent.com/wntrblm/nox/main/nox/sessions.py; official text: “def run( self, *args: str | os.PathLike[str], env: Mapping[str, str | None] | None = None, include_outer_env: bool = True, silent: bool = False, success_codes: Iterable[int] | None = None, log: bool = True, external: Ext”
FAQ
- How is Nox different from tox?
- Nox uses Python files for full flexibility and logic, while tox relies on INI configuration that is more declarative.
- How do I run one session?
- Run nox -s tests and optionally add -p 3.11 to select the Python version for a parametrized session.
- How do I reuse environments?
- Use the reuse_existing_virtualenvs option or the -r flag to skip recreating the virtualenv between runs.
Report a problem with this API docOpens a pre-filled issue on GitHub.