Show HN: Python library to read and manage your Gmail
github.com
github.com
import keyring
pass_is = keyring.get_password('gmail', 'whatever@gmail.com')
you set it with set_password(servicename, username, password)
so set_password('gmail', 'whatever@gmail.com', 'one of those per app passwords if you use 2factor for example')
[1] https://pypi.python.org/pypi/keyringHere's a script to generate them: https://google-mail-oauth2-tools.googlecode.com/svn/trunk/py...
For the record, if you just need to do some simple scripting of your Gmail, maybe on cron, Google Apps Script is great for that. https://developers.google.com/apps-script/
Here's a recent simple example I wrote up. http://mikecr.it/ramblings/marking-gmail-read-with-apps-scri...
If you're looking for non-gmail-specific email lib thingerator, check out IMAPClient (it's better than imaplib I swear!):
I've been planning to create a Python script to help me automatically label my older emails based on content. This is a big help.
Just when I needed it and wanted to write one you posted it. I don't think I would have done half the good job you did.