Query package metadata from pypi.org

Is there any way, maybe as part of the simple api, to query package metadata from pypi.org? I’m thinking specifically about project metadata like dependencies, extras, etc.

dist-info-metadata is available in the simple API for wheels (and sdists if they follow PEP 643). But PyPI doesn’t expose that data (yet).

The PyPI JSON API includes metadata, but it is unreliable as it is at the project release level, so it doesn’t take into account the possibility of different wheels having different metadata. But it’s the nearest you can get right now.

See also: