hatchling-autoextras-hook
Hatchling metadata hook to generate all extras
What it is and what it does
hatchling-autoextras-hook is a build-time plugin for hatchling that intercepts your project's metadata during packaging and automatically creates an `all` extra that merges every optional dependency you've defined. It deduplicates and alphabetizes the combined list, so users can install the entire optional feature set with a single command.
The hook runs only during the build process and does not modify your source files or pyproject.toml. It requires hatchling as its sole runtime dependency and works with Python 3.10 or later. Configuration is minimal—just add the hook declaration to your pyproject.toml and ensure you have at least one dynamic field so hatchling's metadata system will invoke it.
Use it for:
- Simplify installation for users who want all optional features without listing each extra separately.
- Maintain a single source of truth for optional dependencies while automatically exposing a convenience `all` extra.
- Reduce boilerplate in CI/CD pipelines by using a single `all` extra instead of enumerating multiple extras.
- Ensure consistency across multiple packages by centralizing the `all` extra generation logic.
- Avoid manual maintenance of an `all` extra that can become stale when new optional dependencies are added.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Hatchling metadata hook that automatically generates an `all` extra combining all optional dependencies, deduplicating and sorting them alphabetically.
Yes, if you use hatchling and want to offer an `all` extra without manual maintenance. The package is actively maintained, has no known vulnerabilities, and low install friction. It is in beta (Development Status :: 4), so expect the API to change before a 1.0.0 release—pin the version in your build-system.requires if stability is critical.
Install
hatchling-autoextras-hook on PyPI
pip
pip install hatchling-autoextras-hookuv
uv add hatchling-autoextras-hookpoetry
poetry add hatchling-autoextras-hookInstalling hatchling-autoextras-hook
Before you install
Low install friction with a single runtime dependency on hatchling. Active maintenance with last commit on 2026-08-13 and no known vulnerabilities.
License in practice
BSD-3-Clause is a permissive license; you can use, modify, and distribute this package with minimal restrictions, provided you include the license text and disclaimer.
Quickstart
Add to pyproject.toml:
[build-system]
requires = ["hatchling>=1.18.0", "hatchling-autoextras-hook"]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.autoextras]
Then define optional dependencies and install with the generated `all` extra.
Requires at least one dynamic field in [project] metadata for Hatchling metadata hooks to trigger. Hatchling >= 1.18.0 required.
Verify before relying
- Whether the hook works correctly with all Hatchling versions in the >=1.18,<2.0 range or if specific minor versions have known issues.
- Real-world performance impact on build times for projects with many extras.
- Compatibility with Hatchling's other metadata hooks beyond the stated claim that they run in order.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — hatchling |
| Maintenance | actively maintained — 231 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,275,993/month — #4,126 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hatchling_autoextras_hook-0.1.3-py3-none-any.whl
Keywords: automation, hatchling, hook, metadata, optional-dependencies
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
hatch_build_scriptsA Hatch build plugin that runs arbitrary shell…
permissive · top 15,000 on PyPI
hatch-requirements-txtA Hatchling plugin that reads project…
permissive · top 5,000 on PyPI
uv-dynamic-versioningA Hatch plugin that automatically derives…
permissive · top 5,000 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
hatch-regex-commitA Hatch plugin that automatically creates Git…
permissive · top 15,000 on PyPI
hatch-cythonA Hatch build hook that integrates Cython…
permissive · top 15,000 on PyPI
hatch-polylith-bricksA Hatch build hook that integrates Polylith…
permissive · top 15,000 on PyPI
hatch-nodejs-versionProvides Hatch plugins to read and write Python…
permissive · top 15,000 on PyPI
hatch-vcsA Hatch plugin that automatically determines…
permissive · top 1,000 on PyPI
setuptools-git-versioningAutomatically generates PEP 440-compliant…
permissive · top 5,000 on PyPI