Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parser for Pipfiles (get a list of all packages used in a Pipfile)

Is there any parser out there for reading in a Pipfile and returning a list of all packages used in the Pipfile?

If not, how would one go about this? I was thinking a regular expression could do the job, but I am not sufficiently acquainted with the structure of Pipfiles to confirm that is the case.

like image 533
ubadub Avatar asked Sep 12 '25 01:09

ubadub


1 Answers

first install pipfile pip install pipfile.

then just use the parser it provides

from pipfile import  Pipfile
parsed = Pipfile.load(filename=pipfile_path)
like image 107
Joran Beasley Avatar answered Sep 13 '25 15:09

Joran Beasley