Do you want to pull all meetings & events from your or any shared Google calendar via the Google calendar API in Python? This blogpost provides step-for-step instructions on how to setup authentication, request calendar events and handle the pagination token. For the full code, check the calendar-insights repository.

Setup Google Calendar API
First we need to activate the Google Calendar API for a Google cloud project of our choice. Use an existing project or create a new one: At the top of the Google Cloud Console dashboard, click on the project selection and “New Project”, enter a name e.g. “calendar-insights” and click “Create”. Then, in the Google API dashboard, click Enable APIs and services. Search for the Google Calendar API and click Enable.
Next, to enable API queries from our local computer, we need to create and download authentication credentials for that project. In the Credentials section of the API dashboard, click Create Credentials and OAuth Client ID. Select Application type “Desktop app”. Then click “Download JSON” and store the credentials file on your local PC.