Show HN: Python library to read and manage your Gmail
You can also retrieve the password from your system keyring[1]<p><pre><code>    import keyring

    pass_is = keyring.get_password('gmail', 'whatever@gmail.com')
</code></pre>
you set it with<p><pre><code>    set_password(servicename, username, password)
</code></pre>
so<p><pre><code>    set_password('gmail', 'whatever@gmail.com', 'one of those per app passwords if you use 2factor for example')
</code></pre>
[1] <a href="https://pypi.python.org/pypi/keyring" rel="nofollow">https://pypi.python.org/pypi/keyring</a>