pip show --json
See original GitHub issue- Pip version: 10
- Python version: any
- Operating system: any
Description:
This is a feature request, related to #3568 and 4824, but made more necessary by the privatization of pip’s internals: let pip show
gain a --json
flag (or --format=(humanreadable|json)
) (also handling pip show --files
) that outputs the result as json (or whatever other format you deem suitable, but pip list already has --format=json
(hence the suggestion of --format=json
instead of --json
above). Otherwise, it becomes necessary to either parse the output of pip show, or to just copy-paste pip’s implementation, in order to access the same metadata.
What I’ve run:
e.g.
pip show pip
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:26 (18 by maintainers)
Top Results From Across the Web
pip inspect JSON output specification
The pip inspect command produces a detailed JSON report of the Python environment, including installed distributions.
Read more >Why is 'pip show json' showing warning - python
The json module is built into Python itself; it isn't separately downloaded, so it has no separate version. You can verify that multiple ......
Read more >PyJSONViewer
This is a JSON file data viewer based on python. It only uses built-in libraries of python (tkinter, json). Features: Minimum dependency.
Read more >Python Pretty Print JSON
We can use the Python json module to pretty-print the JSON data. The json module is recommended to work with JSON files.
Read more >JSON encoder and decoder — Python 3.11.1 documentation
Source code: Lib/json/__init__.py JSON (JavaScript Object Notation), specified by RFC ... import json >>> print(json.dumps({'4': 5, '6': 7}, sort_keys=True, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since
--format=json
has already been added topip list
I’m in favor of adding the same topip show
.Hi @minggli, the PR improves documentation on existing functionality. @kynan and I are working on fixing the issue. 😃