Manage gmail account using python, forget about imap and just code what you supposed to do.
Project description
GGmail
Manage mail account using python, forget about imap and just code what you supposed to do.
Help
See documentation for more details.
Install
Install using pip install ggmail
.
A Simple Example
from ggmail import Account, Google
from ggmail.policy import from_contains, flagged
authentication = Google(username="ggmail@gmail.com", password="secret")
with Account(authentication=authentication) as account:
inbox = account.inbox()
mailbox = account.create_mailbox("Favorite")
policy = from_contains("from@gmail.com") + flagged
messages = inbox.search(policy)
for message in messages:
message.copy(mailbox)
Additional Information
Why not use imbox instead ?
https://github.com/martinrusev/imbox is less high level than ggmail. I wanted something even more human than imbox.
Why not use gmail instead ?
https://github.com/charlierguo/gmail seems to be dead.
You don't support my mail provider ?
You can raise an issue and I will add it.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ggmail-0.4.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
ggmail-0.4.1-py3-none-any.whl
(12.8 kB
view hashes)