Skip to main content

Module parser

Module parser 

Source
Expand description

Python dependency manifest parsing.

Two manifest shapes share the PypiParser type and its parse_result representation:

  • pyproject.rs: TOML-based manifests (PEP 621, PEP 735, Poetry, PEP 517/518 build-system requires).
  • requirements.rs: line-oriented requirements.txt/constraints.txt files (pip’s requirements file format).

Both paths funnel every PEP 508 requirement string through the shared PypiParser::parse_pep508_requirement below (private — an implementation detail, not part of the public API), so hover, diagnostics, markers and extras render identically regardless of which manifest shape produced the dependency.

Modules§

pyproject
pyproject.toml parsing: PEP 621, PEP 735, Poetry, and PEP 517/518 build-system requires.
requirements
Line-oriented parsing for requirements.txt / constraints.txt — pip’s requirements file format.

Structs§

ParseResult
Parse result containing all dependencies from a Python dependency manifest.
PypiParser
Parser for Python dependency manifests.
RequirementRef
A -r/-c reference to another requirements/constraints file.