This is the simplest Google Search Console query script I could come up with in Python
If you download this Python script and the client_secrets.json file that you get from the Google API Manager and place them in the same directory you'll be able to query your GSC data.
Most of the example scripts on how to use GSC I've seen are long and complicated so I built this one to remove as many moving parts as possible and bring it down to the basics.