A build automation tool for Python projects that uses dependency-based tasks and a plugin system to define build life cycles.
pypa/hatch
Modern, extensible Python project manager covering builds, environments, testing, linting, versioning and publishing.
- Stars
- 7,248
- Forks
- 487
- Open issues
- 447
- Last commit
- 10 days ago
What is it?
Hatch is a command-line tool for managing Python projects from start to finish. It handles project scaffolding, building distributions, creating and managing isolated environments, running tests and static analysis, managing versions, and publishing packages to PyPI or other indexes.
Hatch uses a standardized build system with reproducible builds by default, and its environments support custom scripts and UV. It also manages Python distributions and includes a built-in script runner for executing Python scripts with their dependencies. Project generation follows templates that reflect common best practices.
The project is designed to be extensible through plugins, and its CLI is positioned as faster than comparable tools, according to the project's own benchmarks in CI.
Key features
- 01Standardized build system with reproducible builds by default
- 02Isolated environment management with custom scripts and UV support
- 03Test execution and static analysis with preset defaults
- 04Built-in Python script runner
- 05Publishing to PyPI or other package indexes
- 06Version management and project generation from templates
Use cases
- Building and publishing a Python library to PyPI
- Maintaining separate test and lint environments for a Python project
- Scaffolding a new Python package that follows current best practices
- Running project scripts with their dependencies without manual virtualenv setup
In collections
Topics
FAQ
- What is hatch?
- Modern, extensible Python project manager covering builds, environments, testing, linting, versioning and publishing. Hatch is a command-line tool for managing Python projects from start to finish. It handles project scaffolding, building distributions, creating and managing isolated environments, running tests and static analysis, managing versions, and publishing packages to PyPI or other indexes.
- Is hatch free to use? What license does it have?
- hatch is open source under the MIT license. Check the license terms before using it in commercial products.
- Is hatch still maintained?
- Actively maintained. The last commit to hatch was on Oct 28, 2026.
- What can I use hatch for?
- Building and publishing a Python library to PyPI Maintaining separate test and lint environments for a Python project Scaffolding a new Python package that follows current best practices Running project scripts with their dependencies without manual virtualenv setup
- Where can I get hatch?
- The source code and installation instructions are on GitHub: https://github.com/pypa/hatch
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A command-line tool that automates Python testing and packaging checks across multiple virtual environments and Python versions.
A command-line tool for automating tests across multiple Python environments, configured with a standard Python file instead of tox's ini format.
A Python tool that derives package version numbers from Git or Mercurial tags, integrating with setuptools.
A Python virtualenv and dependency management tool that combines pip and virtualenv, using Pipfile and Pipfile.lock for reproducible builds.
A Python tool that packages applications and their dependencies into single executable .pex files, similar to a portable virtualenv.