Hatchling
Hatchling is a modern, extensible Python build backend used by Hatch, currently at version 1.29.0, released on February 23, 2026. It follows a regular release cadence, with updates approximately every 50 days.
Warnings
- breaking Hatchling v1.28.0 dropped support for Python 3.9.
- gotcha Ensure that 'virtualenv' is installed to manage build environments; otherwise, builds may fail.
Install
-
pip install hatchling
Imports
- BuildHookInterface
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
Quickstart
import os
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomBuildHook(BuildHookInterface):
def initialize(self, version):
pass
def build(self, version):
pass
# Usage
build_hook = CustomBuildHook()
build_hook.initialize('1.0.0')
build_hook.build('1.0.0')