Setting up the parser for reminders and events
In this task, we will implement a module that will blink an LED to remind us about important events and appointments.
Prepare for lift off
The Google Data Python client library is required for this task. You also have to save some tasks in your calendar to test the implementation.
Engage thrusters
Using the Python IDLE's editor, let's get started by creating a new file called
calendars.py
:import gdata.calendar.service import gdata.service import gdata.calendar import time
We can get started by defining a Google Calendar object. We will define the username and password for our Google account:
calendar_service = gdata.calendar.service.CalendarService() calendar_service.email = 'username@gmail.com' calendar_service.password = 'password' calendar_service.ProgrammaticLogin()
The
calendar_query
function performs a query for calendar events by defining a time frame as follows:query = gdata.calendar.service.CalendarEventQuery('default','private','full') query...