Type object
Schema URL https://catalog.lintel.tools/schemas/schemastore/pyproject/_shared/latest--hatch.json
Parent schema pyproject
Type: object

Properties

metadata object

Metadata for the project

3 nested properties
allow-direct-references boolean

Whether to allow direct references

allow-ambiguous-features boolean

Whether to allow ambiguous features

hooks object

Configuration for plugin hooks that allow for the modification of project metadata after it has been loaded

env object

Environment collector plugin configuration

2 nested properties
collectors Record<string, object>

Custom environment collectors

requires string[]

Required environment collectors for automatic management

envs Record<string, object>

Dictionary of environments

build object

Build configuration

Any of: variant, variant
13 nested properties
ignore-vcs boolean

Whether to ignore VCS .*ignore files and include those files by default

Default: false
include string[]

List of glob patterns to include files

exclude string[]

List of glob patterns to exclude files

artifacts string[]

List of glob patterns to include VCS-ignored files

only-packages boolean

Whether to only include non-artifact files in packages

Default: false
sources object | string[]

Rewrite relative paths

skip-excluded-dirs boolean

Whether to skip excluded directories (for performance reasons)

Default: false
reproducible boolean

Whether to make the build reproducible

Default: true
directory string

Directory to write build artifacts to

Default: "dist"
dev-mode-dirs string[]

List of directories to add to PYTHONPATH in development mode

dev-mode-exact boolean

Whether to use an exact dev mode that doesn’t add whole directories to PYTHONPATH

targets Record<target_name, object>

Build targets

hooks Record<hook_name, object>

Configuration for plugin hooks that will be executed at various stages of the build process

version object

Version configuration

3 nested properties
path string

A relative path to a file containing the project version

pattern string

A regex pattern to extract the version

source string

A source to use for retrieving and updating the version.

publish object

Publish configuration

1 nested properties
index object

Publishing index configuration

2 nested properties
disable boolean

Ask for confirmation when publishing to index

Default: false
repos Record<string, object>

Define named repositories to publish to

2 nested properties
main
test

One of

1. variant
version
2. object object
version object required
2 nested properties
path string required
pattern string
3. object object
version object required
1 nested properties
source string required

Definitions

Platform enum
Format object

Options for static analysis and formatting

config-path string

Path to default configuration

Metadata object

Metadata for the project

allow-direct-references boolean

Whether to allow direct references

allow-ambiguous-features boolean

Whether to allow ambiguous features

hooks object

Configuration for plugin hooks that allow for the modification of project metadata after it has been loaded

Override

TODO

Overrides object

Overrides depending on things like platform, matrix variables, or environment variables

platform Record<string, Override>
Env object
template string

Template environment to inherit from. Set to own name to make self referential (disable inheritance from “default”)

Default: "default"
detached boolean

Make the environment self-referential and skip project install

Default: false
dependencies string[]

List of dependencies to install in the environment

extra-dependencies string[]

List of extra dependencies to install in the environment in addition to the template environment’s dependencies

features string[]

List of optional dependency groups (extras) to install

dev-mode boolean

Whether to install the project in development mode

Default: true
skip-install boolean

Whether to skip installing the project

Default: false
env-vars Record<string, string>

Environment variables to set

env-include string[]

Glob patterns of environment variables to include

env-exclude string[]

Glob patterns of environment variables to exclude

scripts Record<string, string | string[]>

Dictionary of scripts to run

pre-install-commands string[]

List of commands to run before installing the project

post-install-commands string[]

List of commands to run after installing the project

python string

Python version to use or an absolute path to a python interpreter

platforms Platform[]

List of platforms to build for

description string

Description of the environment for the env show command

type string

Type of environment. Without plugins, the only supported type is "virtual"

Default: "virtual"
matrix object[]

Matrix of environments

matrix-name-format string

Format string for matrix names, supporting {variable} and {value} placeholders

Default: "{value}"
overrides object

Overrides depending on things like platform, matrix variables, or environment variables

1 nested properties
platform Record<string, Override>
requires string[]

Required environment plugins

Envs Record<string, object>

Dictionary of environments

CollectorEnv object

Environment collector plugin configuration

collectors Record<string, object>

Custom environment collectors

requires string[]

Required environment collectors for automatic management

Target object
ignore-vcs boolean

Whether to ignore VCS .*ignore files and include those files by default

Default: false
include string[]

List of glob patterns to include files

exclude string[]

List of glob patterns to exclude files

artifacts string[]

List of glob patterns to include VCS-ignored files

only-include string[]

List of relative paths to directories or files to include, preventing directory traversal from project root. This option overrides any include patterns.

hooks Record<hook_name, object>

Configuration for plugin hooks that will be executed at various stages of the build process

dependencies string[]

Additional dependencies to install in the environment

require-runtime-dependencies boolean

Whether to install the project’s runtime dependencies

Default: false
require-runtime-features string[]

A list of the project’s runtime features to install

versions string[]

List of versions to build

packages string[]

List of packages to build

force-include Record<string, string>

Whether to force include files

only-packages boolean

Whether to only include non-artifact files in packages

sources Record<string, string>

Rewrite relative paths

bypass-selection boolean

Whether or not to suppress the error when one has not defined any file selection options and all heuristics have failed to determine what to ship

Default: false
CustomTargets Record<target_name, object>

Build targets

Hook object
dependencies string[]

Additional dependencies installed in the build environment

require-runtime-dependencies boolean

Whether to install the project’s runtime dependencies

Default: false
require-runtime-features string[]

A list of the project’s runtime features to install

enable-by-default boolean

Whether to enable current hook (disable to control activation using environment variables)

Default: true
BuildHooks Record<hook_name, object>

Configuration for plugin hooks that will be executed at various stages of the build process

Build object

Build configuration

ignore-vcs boolean

Whether to ignore VCS .*ignore files and include those files by default

Default: false
include string[]

List of glob patterns to include files

exclude string[]

List of glob patterns to exclude files

artifacts string[]

List of glob patterns to include VCS-ignored files

only-packages boolean

Whether to only include non-artifact files in packages

Default: false
sources object | string[]

Rewrite relative paths

skip-excluded-dirs boolean

Whether to skip excluded directories (for performance reasons)

Default: false
reproducible boolean

Whether to make the build reproducible

Default: true
directory string

Directory to write build artifacts to

Default: "dist"
dev-mode-dirs string[]

List of directories to add to PYTHONPATH in development mode

dev-mode-exact boolean

Whether to use an exact dev mode that doesn’t add whole directories to PYTHONPATH

targets Record<target_name, object>

Build targets

hooks Record<hook_name, object>

Configuration for plugin hooks that will be executed at various stages of the build process

Version object

Version configuration

path string

A relative path to a file containing the project version

pattern string

A regex pattern to extract the version

source string

A source to use for retrieving and updating the version.

PublishIndex object

Publishing index configuration

disable boolean

Ask for confirmation when publishing to index

Default: false
repos Record<string, object>

Define named repositories to publish to

2 nested properties
main
test
Publish object

Publish configuration

index object

Publishing index configuration

2 nested properties
disable boolean

Ask for confirmation when publishing to index

Default: false
repos Record<string, object>

Define named repositories to publish to

2 nested properties
main
test
IgnoreVcs boolean

Whether to ignore VCS .*ignore files and include those files by default

Include string[]

List of glob patterns to include files

Exclude string[]

List of glob patterns to exclude files

Artifacts string[]

List of glob patterns to include VCS-ignored files

OnlyInclude string[]

List of relative paths to directories or files to include, preventing directory traversal from project root. This option overrides any include patterns.