pyproject.toml
noun
say it: “PY-praj-ekt dot TOM-ul” /ˈpaɪˌprɑdʒɛkt dɑt ˈtɑməl/
A settings file at the top of a Python project that describes it in one place: its name, version, the packages it needs and how tools such as pytest and Ruff should behave.
What is a pyproject.toml file?
A pyproject.toml file describes a Python project in one place: its name, version, the packages it needs and how tools should treat it.
[project]
name = "coffee-shop"
version = "1.0.0"
dependencies = ["requests>=2.32"]
[tool.pytest.ini_options]
testpaths = ["tests"]
In a sentence
- “The project's name and version live in pyproject.toml.”
- “Ruff reads its rules from pyproject.toml, so everyone on the team gets the same checks.”
Level: Freelancer · More Python terms at this level
Updated