One-liner JSON pretty print python
Pretty-print a JSON file using stdlib
python3 -m json.tool < input.json
more python
all 15 commands →
Profile script
python3 -m cProfile -s cumulative script.py | head -30
Debug with pdb
python3 -m pdb script.py
Set breakpoint in code
breakpoint() # Python 3.7+ — drops into pdb at this line
Run tests with pytest
pytest -x -v --tb=short tests/
Check syntax without running
python3 -m py_compile script.py && echo OK