Can someone suggest how I can beautify JSON in Python or through the command line?
The only online based JSON beautifier which could do it was: http://jsonviewer.stack.h
You could pipe the output to jq. If you python script contains something like
print json.dumps(data)
then you can fire:
python foo.py | jq '.'