Uncategorized

pypi – Does python expose an interface for parsing package metadata?


Note: I am NOT looking for a way to interrogate installed packages in the virtual environment and do not want to load packages in order to parse them.

I’m looking for a way to parse meta data from files [wheels and tar.gz] downloaded from pypi. The format isn’t so complex so I’m not really against writing my own. But given that python must be parsing this info inside importlib I wanted to see if theres a way that doesn’t involve re-inventing the wheel.

I can see that importlib.metadata lets me get this information for installed pacakges. But I want to do this for a lot of versions of the same packages; many of which may not be compatible with the current virtual environment or even system architecture.

Does python (>=3.10) offer any interface for parsing wheel and tar.gz metadata without actually installing it into the virtual environment?



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *