Check out the reasonably modular and cleanly written pyg installer. https://github.com/rubik/pyg/ It has its own independent package database / metadata parser. https://github.com/rubik/pkgtools/blob/master/pkgtools/pkg.py It has a pypi interface too.