question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

  • 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:26 (18 by maintainers)

github_iconTop GitHub Comments

7reactions
xavfernandezcommented, Feb 11, 2019

Since --format=json has already been added to pip list I’m in favor of adding the same to pip show.

3reactions
MarckKcommented, Oct 27, 2018

Hi @minggli, the PR improves documentation on existing functionality. @kynan and I are working on fixing the issue. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found