The below depends on the
json Python module to ‘pretty print’ JSON output in Python. I found this useful when trying to write my script to remove unused Todoist labels.
# This function saves time printing JSON nicely
Note that in my case this was contingent on having used the
requests module in the following fashion to already make sure the format is a bit jsonified, if I understand the
.json at the end, which is not 100% guaranteed.
r = requests.post(todoistURL+"/login", params=loginParams).json()
There are numerous other ways to get JSON from an API or whatever than just using requests (I think people also use urllib?), but this is the route I took.