pyproject.toml
PronunciationPY-proj-ekt TOM-ul
Definition
pyproject.toml is the standard configuration file of a Python project. It holds the project's name, version, dependencies and build settings, plus the settings of tools such as Ruff and pytest. TOML is its simple key = value format.
Where you hear it
When creating or publishing a Python package, configuring linters and test tools, and reading a repo's setup.
Examples
All the tool settings live in
pyproject.toml.Add the dependency to
pyproject.tomland reinstall.The name, the version and the dependencies are all in pyproject.toml now.
Common mistake
Keeping the same settings in several files. One pyproject.toml should be the single source.
Don't confuse with
requirements.txt, which only lists packages to install. pyproject.toml describes the whole project.
Say it at work
- In a meeting or chat
Where is the Ruff config? In pyproject.toml.
- In an email or ticket
The build backend is declared in pyproject.toml.
Keep exploring
More in DevOps & Cloud