pyproject.toml overview
How project metadata and tool tables sit together in a modern Python pyproject.toml.
[project]
PEP 621 expects name and version (or a dynamic story). dependencies is an array of requirement strings. Optional dependency groups live under [project.optional-dependencies].
[tool.*]
Tools nest under [tool.name]. Ruff commonly uses line-length, target-version, and lint/format subtables. Keep unrelated tools in their own tables.
Check with Schema
Use the Schema tool’s pyproject or Ruff preset to catch missing name/version or a missing tool.ruff block early.
Validate a pyproject sample against the built-in preset.
Open Schema