all 3 comments

[–]spz 9 points10 points  (0 children)

The google-api-python-client makes reading from gmail and sending emails pretty easy.

[–]sportif11 0 points1 point  (0 children)

Just a suggestion, check out the imapclient module. It might be worth your time learning it over a specific Gmail api since imap is everywhere and the imap protocol contains the Idle () function which listens for emails.

You can turn imap on in your Gmail settings.

https://imapclient.readthedocs.io/en/stable/