{"id":27291,"library":"pyproject-dependencies","title":"pyproject-dependencies","description":"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.","status":"active","version":"1.3.2","language":"python","source_language":"en","source_url":"https://github.com/sbidoul/pyproject-dependencies","tags":["dependencies","pyproject.toml","tool","python"],"install":[{"cmd":"pip install pyproject-dependencies","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used internally for dependency resolution","package":"pip","optional":true}],"imports":[{"wrong":"from pyproject_dependencies import get_dependencies","symbol":"get_dependencies","correct":"from pyproject_dependencies import get_dependencies"}],"quickstart":{"code":"import os\nfrom pyproject_dependencies import get_dependencies\n\n# Assuming pyproject.toml is in the current directory\nresults = get_dependencies()\nprint('Main dependencies:', results.get('dependencies', []))\nprint('Optional groups:', results.get('extras', {}))\n\n# For a specific directory\nresults = get_dependencies('path/to/project')\nprint('Dependencies from path:', results.get('dependencies', []))","lang":"python","description":"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)."},"warnings":[{"fix":"Access results['extras'] to get optional dependency groups.","message":"Optional dependencies are not included in 'dependencies' key; they are in 'extras' dict.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"If using CLI, use --extras flag to see optional dependencies. For API, use results['extras'].","message":"In v1.3, optional dependencies were no longer printed by the CLI. The API behavior changed: extras are only returned as a separate dict key.","severity":"breaking","affected_versions":">=1.3"},{"fix":"Ensure the project can be resolved (e.g., run pip install -e .) before calling get_dependencies, or pre-compute static dependencies.","message":"Dynamic version fields (e.g., from setuptools-scm) can cause resolution failures. v1.3.1 fixed some issues but dynamic deps may still fail.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.3.2':33 '3.7':30 'cadenc':35 'compat':27 'current':31 'depend':3,8,21,25,37 'dynam':20 'extra':26 'extract':7 'file':11 'includ':23 'irregular':36 'option':24 'pyproject':2 'pyproject-depend':1 'pyproject.toml':10,38 'python':29,40 'releas':34 'resolut':22 'robust':14 'static':18 'support':16 'tool':5,39 'version':32 'way':15","created_at":"2026-05-01T17:45:29.673429+00:00","updated_at":"2026-05-01T17:45:29.673429+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'get_dependencies' from 'pyproject_dependencies' (/tmp/tmpwpkec38x/venv/lib/python3.12/site-packages/pyproject_dependencies/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/sbidoul/pyproject-dependencies","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pyproject-dependencies/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}