deps-pypi
PyPI/Python support for deps-lsp.
This crate provides parsing and registry integration for Python's PyPI ecosystem.
Features
- PEP 621 Support — Parse
[project.dependencies]and[project.optional-dependencies] - PEP 735 Support — Parse
[dependency-groups](new standard) - Poetry Support — Parse
[tool.poetry.dependencies]and groups - Lock File Parsing — Extract resolved versions from
poetry.lockanduv.lock - PEP 508 Parsing — Handle complex dependency specifications with extras and markers
- PEP 440 Versions — Validate and compare Python version specifiers
- PyPI API Client — Fetch package metadata from PyPI JSON API
- EcosystemHandler — Implements
deps_core::EcosystemHandlertrait
Usage
[]
= "0.5"
use ;
let dependencies = parse_pyproject_toml?;
let registry = new;
let versions = registry.get_versions.await?;
Supported Formats
PEP 621 (Standard)
[]
= [
"requests>=2.28.0,<3.0",
"flask[async]>=3.0",
]
[]
= ["pytest>=7.0", "mypy>=1.0"]
PEP 735 (Dependency Groups)
[]
= ["pytest>=7.0", "coverage"]
= [{ = "test"}, "mypy>=1.0"]
Poetry
[]
= "^3.9"
= "^2.28.0"
[]
= "^7.0"
Benchmarks
Parsing performance: ~5μs for PEP 621, ~8μs for Poetry format.