Registry / devops / pyproject-dependencies

pyproject-dependencies

JSON →
library1.3.2pypypiunverified

A tool to extract dependencies from pyproject.toml files in a robust way. Supports both static and dynamic dependency resolution, including optional dependencies (extras). Compatible with Python 3.7+. Current version: 1.3.2. Release cadence: irregular.

pip install pyproject-dependencies
INSTALL
IMPORT
SIG · PYPROJECT-DEPENDEN
P
pyproject-dependencies
devopspythonv1.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_dependencies
✓ from pyproject_dependencies import get_dependencies
✗ from pyproject_dependencies import get_dependencies

Extract dependencies from a pyproject.toml file. Returns a dict with 'dependencies' (list of strings) and 'extras' (dict mapping group name to list of strings).

import os from pyproject_dependencies import get_dependencies # Assuming pyproject.toml is in the current directory results = get_dependencies() print('Main dependencies:', results.get('dependencies', [])) print('Optional groups:', results.get('extras', {})) # For a specific directory results = get_dependencies('path/to/project') print('Dependencies from path:', results.get('dependencies', []))
Debug
Known issues
gotchaOptional dependencies are not included in 'dependencies' key; they are in 'extras' dict.
fix
Access results['extras'] to get optional dependency groups.
affects: >=1.0
breakingIn v1.3, optional dependencies were no longer printed by the CLI. The API behavior changed: extras are only returned as a separate dict key.
fix
If using CLI, use --extras flag to see optional dependencies. For API, use results['extras'].
affects: >=1.3
gotchaDynamic version fields (e.g., from setuptools-scm) can cause resolution failures. v1.3.1 fixed some issues but dynamic deps may still fail.
fix
Ensure the project can be resolved (e.g., run pip install -e .) before calling get_dependencies, or pre-compute static dependencies.
affects: >=1.0
Upgrade
Version history
1.3.2latest on PyPI · released Sep 23, 2023
Audit
Dependencies
pipoptionalUsed internally for dependency resolution
Agent activity
11 hits · last 30 days
node
10
Resources
pyproject-dependencies — pip install pyproject-dependencies · libregistry