How do I print a .json file in python

I was wondering if anyone knows how to print a .json file in python using the same formatting as if I was running it from JavaScript. I’m using it for api usage and the output is .json but when I print it I get this:
link to image

However the api documentation has this:
another image

(The images show different sections of it)