When you work with most of the Google APIs (excluding AI and Machine Learning APIs), the first thing you will have to do is to create a Service instance to connect to the Google API endpoint. Since the steps to create a Service instance for Google APIs services are the same except the API service name, version name, and scopes are different.

In this tutorial I will share a function that I use to help me simplify the process of construct a Google API Service instance in Python.

Python Script