dependency-groups
A tool for resolving PEP 735 Dependency Group data
What it is and what it does
dependency-groups is a library that implements PEP 735 Dependency Groups, a standard for organizing optional dependencies in pyproject.toml files. It provides a resolver that parses definitions, follows include directives, and outputs resolved dependency lists. The package is useful for projects that want to organize optional dependencies into logical groups—such as dev, test, docs, or feature-specific sets—and then install or validate them programmatically or from the command line.
The library ships with both a Python API (DependencyGroupResolver and resolve() function) and CLI tools: a module command to print contents, a linter to validate all groups in a project, a wrapper for pip install, and a pre-commit hook. It supports Python 3.8 through 3.13 on CPython and PyPy, with no compiled dependencies.
Use it for:
- Organize development, testing, and documentation dependencies into named groups in pyproject.toml and resolve them programmatically.
- Validate all groups in a project during CI/CD using the lint-dependency-groups CLI command.
- Install a specific group from the command line using pip-install-dependency-groups without manually listing packages.
- Integrate linting into pre-commit hooks to catch malformed groups before commit.
- Build tooling that needs to read and process PEP 735 metadata from project files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and resolves PEP 735 dependency groups from pyproject.toml, following includes and providing both programmatic and CLI access to group contents.
Yes. The package is actively maintained, has no security vulnerabilities, carries a permissive MIT license, and solves a real problem for projects adopting PEP 735. Install friction is minimal. It is useful both as a library for tools that need to parse groups and as a CLI utility for developers managing complex optional dependencies.
Install
dependency-groups on PyPI
pip
pip install dependency-groupsuv
uv add dependency-groupspoetry
poetry add dependency-groupsInstalling dependency-groups
Before you install
Low friction: pure Python wheel with only two lightweight runtime dependencies (packaging and tomli). Active maintenance with recent commits; last release 469 days ago but repository shows ongoing activity.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for any project type.
Quickstart
pip install dependency-groups
from dependency_groups import resolve
# Resolve a group from pyproject.toml
deps = resolve('dev')
print(deps) # List of dependency specifiers
Verify before relying
- Whether the package handles all edge cases in PEP 735 or has known limitations in resolution.
- Performance characteristics when resolving deeply nested or circular includes.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — packaging, tomli |
| Maintenance | actively maintained — 469 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,909,457/month — #1,814 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dependency_groups-1.3.1-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
johnnydepJohnnydep displays the full dependency tree of…
permissive · top 15,000 on PyPI
uv-sortAlphabetically sorts dependencies in uv's…
permissive · top 15,000 on PyPI
pdmPDM is a modern Python package and dependency…
unclear · top 5,000 on PyPI
pyproject-tomlParses and validates Python project metadata…
permissive · top 15,000 on PyPI
validate-pyprojectValidates pyproject.toml files against JSON…
copyleft · top 15,000 on PyPI
pipdeptreepipdeptree displays installed Python packages…
permissive · top 5,000 on PyPI
hatch-requirements-txtA Hatchling plugin that reads project…
permissive · top 5,000 on PyPI
juliapkgManages Julia language installation and package…
permissive · top 15,000 on PyPI
requirementslibParses, builds, and converts between Pipfile…
permissive · top 15,000 on PyPI
pyproject-parserParses and extracts metadata from…
permissive · top 15,000 on PyPI