I am very very :-1: on using pip internals. The PyPA team needs to expose this through a known supported and stable interface if we are going to touch, most likely via the CLI.