SlyGmail.gmail#

GMail API and types

Classes

Email(to, sender, subject, body, attachments)

Gmail(auth)

Gmail API Client

Scope()

class SlyGmail.gmail.Scope[source]#

Bases: object

GMail = 'https://mail.google.com/'#
GMailSend = 'https://www.googleapis.com/auth/gmail.send'#
GMailReadOnly = 'https://www.googleapis.com/auth/gmail.readonly'#
class SlyGmail.gmail.Email(to: str, sender: str, subject: str, body: str, attachments: list[str | tuple[bytes, str]])[source]#

Bases: object

Parameters:
to: str#
sender: str#
subject: str#
body: str#
attachments: list[str | tuple[bytes, str]]#
await encoded()[source]#
Return type:

str

class SlyGmail.gmail.Gmail(auth)[source]#

Bases: WebAPI

Gmail API Client

Parameters:

auth (OAuth2) –

base_url: str = 'https://gmail.googleapis.com/upload/gmail/v1/'#
await send(to, subject, body, attachments=None, from_email='me')[source]#
Parameters: