Pyioga is a short name for “Python IMAP Oauth2 Google Authenticator Helper” - It sounds kinda funny but I didn’t really put too much effort in making this up.
The goal of this “project” is to help with setting up Google OAuth2 authentication for IMAP connection with Gmail. But I’m not really considering it as a project - more like a useful source of information.
I wrote it after I had an urgent need to implement reading emails from Gmail for my script. I was surprised that it wasn’t straighforward. I mean it kinda is when you are looking at pyioga’s code (less than 100 lines of code), but it isn’t when you’re in hurry.
I wrote instructions (see README.md) how to setup credentials on Google’s side and then how to use them in script.
What you are receiving from pyioga is access token which can be used to create OAuth2 “auth string”. This string is used for authentication via IMAP protocol.
But what’s wrong with using username/password to authenticate?
Well… since May 30, 2022, Google no longer supports Less secure apps option, as you can read here. Thus, your best option (if you’re not using Google Workspace) is to use OAuth2.
Actually, it’s my first package that I uploaded to PyPI.