You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pip index versions is an experimental command that scratches the itch to check latest and available versions from index servers.
The output is clearly readable for humans but inconvenient to parse programmatically.
The two questions I think someone might want to query are:
is a specific version equal to the latest version?
is a specific version available?
To answer these, one has to resort to parsing the current output, and that depends on current formatting of the output.
Describe the solution you'd like
There should be at least an option/flag to provide the output in a machine readable format. For example as json that one could conveniently parse with jq.
Alternatively there could be other subcommands to pip index that answer the two questions I noted directly.
I just opened a PR(#10985) which adds a new flag to the command that prints only the latest version of a given package without the need of parsing the output with commands like awk.
Agreed that a formatted output would be nice. Am currently trying to programmatically use pip index versions, and it is slightly inconvenient to parse via regex.
What's the problem this feature will solve?
pip index versions
is an experimental command that scratches the itch to check latest and available versions from index servers.The output is clearly readable for humans but inconvenient to parse programmatically.
The two questions I think someone might want to query are:
To answer these, one has to resort to parsing the current output, and that depends on current formatting of the output.
Describe the solution you'd like
There should be at least an option/flag to provide the output in a machine readable format. For example as json that one could conveniently parse with
jq
.Alternatively there could be other subcommands to
pip index
that answer the two questions I noted directly.Alternative Solutions
is
PACKAGE_VERSION
in available versions?get latest version
Additional context
Code of Conduct
The text was updated successfully, but these errors were encountered: