several tools to simplify email-attatchment management, calendar-handeling,...
Complete the steps described in https://developers.google.com/gmail/api/quickstart/python to create a simple Python command-line application that makes requests to the Gmail API.
there are excelent examples wich can be modified. To have somthing to start with, i wrote a short script which enebles the downloads of all attatchments of a pre defined e-mail (sender) adress.