PyProject
Python project metadata and configuration
| Type | object |
|---|---|
| File match |
pyproject.toml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/pyproject/latest.json |
| Source | https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/pyproject.json |
Validate with Lintel
npx @lintel/lintel check
Properties
There are two kinds of metadata: static and dynamic.
- Static metadata is listed in the
[project]table directly and cannot be specified or changed by a tool. - Dynamic metadata key names are listed inside the
dynamickey and represents metadata that a tool will later provide.
20 nested properties
Valid name consists only of ASCII letters and numbers, period, underscore and hyphen. It must start and end with a letter or number.
Version of the project, as defined in the Version specifier specification, and preferably already normalized.
Summary description of the project in one line. Tools may not accept multiple lines.
Value can be a relative path to text / markdown (.md suffix) / reStructuredText (.rst suffix) readme file, or a table with either:
filekey containing path of aforementioned readme file, ortextkey containing the full readme text embedded insidepyproject.toml.
Specifies the Python version(s) that the distribution is compatible with. Must be in the format specified in Version specifiers.
For now it is a table with either:
filekey specifying a relative path to a license file, ortextkey containing full license content
Newer tool may accept a single SPDX license expression string instead of a table.
Relative paths or globs to paths of license files. Can be an empty list.
People or organizations considered as 'authors' of the project. Each author is a table with name key, email key, or both.
People or organizations considered as 'maintainers' of the project. Each maintainer is a table with name key, email key, or both.
List of keywords or tags that describe the project. They could be used by search engines to categorize the project.
List of Trove classifiers that describe the project. PyPI use the classifiers to categorize projects.
Table consisting one or multiple label: URL pairs. Common indexes like PyPI uses well-known Project URLs when presenting project pages.
Table of entry points that allows package installers to create a command-line wrapper for. Each key is the name of the script to be created, and each value is the function or object to all, in form of either importable.module or importable.module:object.attr. Windows platform treats console_scripts specially in that they are wrapped in a console executable, so they are attached to a console and can use sys.stdin, sys.stdout and sys.stderr for I/O.
Table of entry points that allows package installers to create a GUI wrapper for. Each key is the name of the script to be created, and each value is the function or object to all, in form of either importable.module or importable.module:object.attr. Windows platform treats gui_scripts specially in that they are wrapped in a GUI executable, so they can be started without a console, but cannot use standard streams unless application code redirects them.
Extra entry point groups that allow applications to load plugins. For example, Pygments (a syntax highlighting tool) can use additional styles from separately installed packages through [project.entry-points."pygments.styles"]. Each key is the name of the entry-point group, and each value is a table of entry points.
An array of dependency specifier strings, each representing a mandatory dependent package of the project.
Each entry is a key/value pair, with the key specifying extra feature name (such as socks in requests[socks]), and value is an array of dependency specifier strings.
Specifies which keys are intentionally unspecified under [project] table so build backend can/will provide such metadata dynamically. Each key must be listed only once. It is an error to both list a key in dynamic and use the key directly in [project].
One of the most common usage is version, which allows build backend to retrieve project version from source code or version control system instead of hardcoding it in pyproject.toml.
Named groups of dependencies, similar to requirements.txt files, which launchers, IDEs, and other tools can find and identify by name. Each item in [dependency-groups] is defined as mapping of group name to list of dependency specifiers.
1 nested properties
Each list item should be either:
- dependency specifiers, or
- table with a single key
include-groupwhich specifies another group name to include into this one
Declares any Python level dependencies that must be installed in order to run the project’s build system successfully.
3 nested properties
List of strings following the version specifier specification, representing dependencies required to execute the build system.
String is formatted following the same module:object syntax as a setuptools entry point. It’s also legal to leave out the :object part.
list of directoriesrepend to sys.path when loading the build backend, relative to project root
Every tool that is used by the project can have users specify configuration data as long as they use a sub-table within [tool]. Generally a project can use the subtable tool.$NAME if, and only if, they own the entry for $NAME in the Cheeseshop/PyPI.
21 nested properties
The uncompromising Python code formatter.
Build Python wheels for all platforms.
Optional static typing for Python.
An extremely fast Python linter and formatter, written in Rust.
An extremely fast Python type checker, written in Rust.
Modern, extensible Python project management.
Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
Improved build system generator for Python C/C++/Fortran extensions
Easily download, build, install, upgrade, and uninstall Python packages.
Manage Python package versions using SCM (e.g. Git).
A package manager and task runner.
A task runner that works well with pyproject.toml files.
Python dependency management and packaging made easy.
A modern Python package manager with PEP 621 support.
Static type checker for Python.
Standardized automated testing of Python packages
Review a repository for best practices.
The complementary task runner for python.
Tombi is a toolkit for TOML; providing a formatter/linter and language server
Standardized automated testing of Python packages
An extremely fast Python package installer and resolver, written in Rust.
Definitions
Declares any Python level dependencies that must be installed in order to run the project’s build system successfully.
List of strings following the version specifier specification, representing dependencies required to execute the build system.
String is formatted following the same module:object syntax as a setuptools entry point. It’s also legal to leave out the :object part.
list of directoriesrepend to sys.path when loading the build backend, relative to project root
Each list item should be either:
- dependency specifiers, or
- table with a single key
include-groupwhich specifies another group name to include into this one