mod pypi

module pypi

Offline PyPI / requirements.txt adapter.

Live Warehouse queries are out of scope for the default test gate. The parser accepts three deterministic inputs:

  1. a Warehouse-shaped JSON object (info + optional urls);

  2. a JSON array of those objects (first entry is the root, the rest are additional site extras that become run dependencies);

  3. a requirements.txt of PEP 508 specs (first package is the root).

Markers with extra == are dropped (optional extras). Other environment markers become residuals. The adapter never invents a SHA-256.

Functions

fn parse_pypi_str(text: &str) -> Result<ForeignRecipe, ForeignError>

Parse a PyPI JSON document or a requirements.txt body.