diff --git a/README.md b/README.md index 47aa210..61cd3c1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![pages-build-deployment](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment) [![pypi-publish](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml) +[![none-shall-pass](https://github.com/thevickypedia/gmail-connector/actions/workflows/markdown-validation.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/markdown-validation.yml) [![Pypi-format](https://img.shields.io/pypi/format/gmail-connector)](https://pypi.org/project/gmail-connector/#files) [![Pypi-status](https://img.shields.io/pypi/status/gmail-connector)](https://pypi.org/project/gmail-connector) diff --git a/doc_generator/conf.py b/doc_generator/conf.py index d50bb40..14802e7 100644 --- a/doc_generator/conf.py +++ b/doc_generator/conf.py @@ -13,7 +13,6 @@ import os import sys -sys.path.insert(0, os.path.abspath('../gmailconnector')) sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- diff --git a/docs/README.html b/docs/README.html index d798b09..0f55ce0 100644 --- a/docs/README.html +++ b/docs/README.html @@ -45,7 +45,8 @@
Environment variables can be loaded from any .env
file.
# For authentication
-GMAIL_USER='username@gmail.com',
+GMAIL_USER='username@gmail.com',
GMAIL_PASS='<ACCOUNT_PASSWORD>'
-
-# For outbound SMS
-PHONE='1234567890'
-Optionally .env
files can also be scanned for:
+
+Env variable customization
To load a custom .env
file, set the filename as the env var env_file
before importing gmailconnector
+import os
+os.environ['env_file'] = 'custom' # to load a custom .env file
+import gmailconnector as gc
+
+
+To avoid using env variables, arguments can be loaded during object instantiation.
import gmailconnector as gc
-
-gc.load_env(scan=True)
+kwargs = dict(gmail_user='EMAIL_ADDRESS',
+ gmail_pass='PASSWORD',
+ encryption=gc.Encryption.SSL,
+ timeout=5)
+email_obj = gc.SendEmail(**kwargs)
-
+
Usage¶
diff --git a/docs/_sources/README.md.txt b/docs/_sources/README.md.txt
index aa069af..61cd3c1 100644
--- a/docs/_sources/README.md.txt
+++ b/docs/_sources/README.md.txt
@@ -3,6 +3,7 @@
[![pages-build-deployment](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment)
[![pypi-publish](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml)
+[![none-shall-pass](https://github.com/thevickypedia/gmail-connector/actions/workflows/markdown-validation.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/markdown-validation.yml)
[![Pypi-format](https://img.shields.io/pypi/format/gmail-connector)](https://pypi.org/project/gmail-connector/#files)
[![Pypi-status](https://img.shields.io/pypi/status/gmail-connector)](https://pypi.org/project/gmail-connector)
@@ -27,20 +28,29 @@ pip install gmail-connector
## Env Vars
Environment variables can be loaded from any `.env` file.
```bash
-# For authentication
GMAIL_USER='username@gmail.com',
GMAIL_PASS=''
-
-# For outbound SMS
-PHONE='1234567890'
```
-*Optionally `.env` files can also be scanned for:*
+
+Env variable customization
+
+To load a custom `.env` file, set the filename as the env var `env_file` before importing `gmailconnector`
```python
+import os
+os.environ['env_file'] = 'custom' # to load a custom .env file
import gmailconnector as gc
-
-gc.load_env(scan=True)
```
+To avoid using env variables, arguments can be loaded during object instantiation.
+```python
+import gmailconnector as gc
+kwargs = dict(gmail_user='EMAIL_ADDRESS',
+ gmail_pass='PASSWORD',
+ encryption=gc.Encryption.SSL,
+ timeout=5)
+email_obj = gc.SendEmail(**kwargs)
+```
+
## Usage
### [Send SMS](https://github.com/thevickypedia/gmail-connector/blob/master/gmailconnector/send_sms.py)
diff --git a/docs/genindex.html b/docs/genindex.html
index c476d34..1f48b44 100644
--- a/docs/genindex.html
+++ b/docs/genindex.html
@@ -53,6 +53,7 @@ Index
| M
| N
| O
+ | P
| R
| S
| T
@@ -65,7 +66,7 @@ A
@@ -127,7 +128,7 @@ C
(gmailconnector.send_sms.SendSMS method)
- cricket (gmailconnector.models.config.SMSGateway attribute)
+ cricket (gmailconnector.models.config.SMSGatewayModel attribute)
@@ -151,19 +152,43 @@ D
E
-
+
F
@@ -174,6 +199,8 @@ F
@@ -187,6 +214,24 @@ G
get_mx_records() (in module gmailconnector.validator.domain)
+ gmail_host (gmailconnector.models.config.EgressConfig attribute)
+
+
+ gmail_pass (gmailconnector.models.config.EgressConfig attribute)
+
+
+ gmail_user (gmailconnector.models.config.EgressConfig attribute)
+
+
gmailconnector.models.config
@@ -208,6 +253,8 @@ G
module
+
+
-
gmailconnector.read_email
@@ -222,8 +269,6 @@
G
- module
-
-
-
gmailconnector.send_sms
@@ -275,9 +320,13 @@
I
- important (gmailconnector.models.options.Folder attribute)
- inbox (gmailconnector.models.options.Folder attribute)
+
+ - IngressConfig (class in gmailconnector.models.config)
+ - IngressConfig.Config (class in gmailconnector.models.config)
+
- instantiate() (gmailconnector.read_email.ReadEmail method)
- InvalidDomain
@@ -296,6 +345,22 @@
J
M
+ - model_config (gmailconnector.models.config.EgressConfig attribute)
+
+
+ - model_fields (gmailconnector.models.config.EgressConfig attribute)
+
+
-
module
@@ -350,14 +415,24 @@
O
+P
+
+
+
+
R
Welcome to Gmail Connector’s documentation!Send SMS¶
-
-class gmailconnector.send_sms.SendSMS(gmail_user: str = None, gmail_pass: str = None, timeout: Union[int, float] = 10, gmail_host: str = 'smtp.gmail.com', encryption: __str__ = Encryption.TLS)¶
+class gmailconnector.send_sms.SendSMS(**kwargs: EgressConfig)¶
Initiates Messenger object to send an SMS to a phone number using SMS gateway provided by the mobile carrier.
>>> SendSMS
-Initiates all the necessary args.
-
-- Parameters:
-
-gmail_user – Gmail username to authenticate SMTP lib.
-gmail_pass – Gmail password to authenticate SMTP lib.
-timeout – Connection timeout for SMTP lib.
-encryption – Type of encryption to be used.
-gmail_host – Hostname for gmail’s smtp server.
-
+Initiates necessary args, creates a connection with Gmail host based on chosen encryption type.
+
+- kwargs:
gmail_user: Gmail username to authenticate SMTP lib.
+gmail_pass: Gmail password to authenticate SMTP lib.
+timeout: Connection timeout for SMTP lib.
+encryption: Type of encryption to be used.
+gmail_host: Hostname for gmail’s smtp server.
@@ -120,7 +117,7 @@ Welcome to Gmail Connector’s documentation!
-
-send_sms(message: str, phone: str = None, subject: str = None, sms_gateway: __str__ = 'tmomail.net', delete_sent: bool = False) Response ¶
+send_sms(message: str, phone: str = None, subject: str = None, sms_gateway: SMSGatewayModel(att='mms.att.net', tmobile='tmomail.net', verizon='vtext.com', boost='smsmyboostmobile.com', cricket='sms.cricketwireless.net', uscellular='email.uscc.net', all=('mms.att.net', 'tmomail.net', 'vtext.com', 'smsmyboostmobile.com', 'sms.cricketwireless.net', 'email.uscc.net')) = None, delete_sent: bool = False) Response ¶
Initiates a TLS connection and sends a text message through SMS gateway of destination number.
- Parameters:
@@ -153,17 +150,6 @@ Welcome to Gmail Connector’s documentation!
--
-static validate_phone(phone: str) None ¶
-Validates all the arguments passed during object initialization.
-
-- Parameters:
-phone – Phone number.
-
-
-
-
@@ -215,21 +201,18 @@ Welcome to Gmail Connector’s documentation!Send Email¶
-
-class gmailconnector.send_email.SendEmail(gmail_user: str = None, gmail_pass: str = None, timeout: Union[int, float] = 10, gmail_host: str = 'smtp.gmail.com', encryption: __str__ = Encryption.TLS)¶
+class gmailconnector.send_email.SendEmail(**kwargs: EgressConfig)¶
Initiates Emailer object to email defined recipient from a defined sender with or without attachments.
>>> SendEmail
-Initiates necessary args, creates a connection with Gmail’s SMTP on port 587.
-
-- Parameters:
-
-gmail_user – Gmail username to authenticate SMTP lib.
-gmail_pass – Gmail password to authenticate SMTP lib.
-timeout – Connection timeout for SMTP lib.
-encryption – Type of encryption to be used.
-gmail_host – Hostname for gmail’s smtp server.
-
+Initiates necessary args, creates a connection with Gmail host based on chosen encryption type.
+
+- kwargs:
gmail_user: Gmail username to authenticate SMTP lib.
+gmail_pass: Gmail password to authenticate SMTP lib.
+timeout: Connection timeout for SMTP lib.
+encryption: Type of encryption to be used.
+gmail_host: Hostname for gmail’s smtp server.
@@ -289,7 +272,7 @@ Welcome to Gmail Connector’s documentation!
-
-send_email(subject: str, recipient: Union[str, list], sender: str = 'GmailConnector', body: str = None, html_body: str = None, attachment: Union[str, list] = None, filename: Union[str, list] = None, custom_attachment: Dict[Union[str, PathLike], str] = None, cc: Union[str, list] = None, bcc: Union[str, list] = None, fail_if_attach_fails: bool = True) Response ¶
+send_email(subject: str, recipient: Union[str, list], sender: str = 'GmailConnector', body: Optional[str] = None, html_body: Optional[str] = None, attachment: Optional[Union[str, list]] = None, filename: Optional[Union[str, list]] = None, custom_attachment: Optional[Dict[Union[str, PathLike], str]] = None, cc: Optional[Union[str, list]] = None, bcc: Optional[Union[str, list]] = None, fail_if_attach_fails: bool = True) Response ¶
Initiates a TLS connection and sends the email.
- Parameters:
@@ -329,19 +312,18 @@ Welcome to Gmail Connector’s documentation!Read Email¶
-
-class gmailconnector.read_email.ReadEmail(gmail_user: str = None, gmail_pass: str = None, folder: __str__ = 'inbox', gmail_host: str = 'imap.gmail.com', timeout: Union[int, float] = 10)¶
+class gmailconnector.read_email.ReadEmail(**kwargs: IngressConfig)¶
Initiates Emailer object to authenticate and yield the emails according the conditions/filters.
>>> ReadEmail
-Initiates all the necessary args.
-
-- Parameters:
-
-gmail_user – Gmail username to authenticate IMAP lib.
-gmail_pass – Gmail password to authenticate IMAP lib.
-folder – Folder where the emails have to be read from.
-
+Initiates necessary args, creates a connection with Gmail host to read emails from the chosen folder.
+
+- kwargs:
gmail_user: Gmail username to authenticate SMTP lib.
+gmail_pass: Gmail password to authenticate SMTP lib.
+timeout: Connection timeout for SMTP lib.
+gmail_host: Hostname for gmail’s smtp server.
+folder: Folder where the emails have to be read from.
References
@@ -435,7 +417,7 @@ Welcome to Gmail Connector’s documentation!Validator¶
-
-gmailconnector.validator.validate_email.validate_email(email_address: str, timeout: ~typing.Union[int, float] = 5, sender: str = None, debug: bool = False, smtp_check: bool = True, logger: ~logging.Logger = <Logger validator (DEBUG)>) Response ¶
+gmailconnector.validator.validate_email.validate_email(email_address: str, timeout: ~typing.Union[int, float] = 5, sender: ~typing.Optional[str] = None, debug: bool = False, smtp_check: bool = True, logger: ~logging.Logger = <Logger validator (DEBUG)>) Response ¶
Validates email address deliver-ability using SMTP.
- Parameters:
@@ -553,10 +535,97 @@ Welcome to Gmail Connector’s documentation!
Models - Config¶
+
+-
+class gmailconnector.models.config.EgressConfig(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, gmail_user: EmailStr, gmail_pass: str, recipient: Optional[EmailStr] = None, phone: Optional[str] = None, gmail_host: str = 'smtp.gmail.com', encryption: Encryption = Encryption.TLS, timeout: int = 10, **values: Any)¶
+Configure arguments for SendEmail
/SendSMS
and validate using pydantic
to share across modules.
+>>> EgressConfig
+
+
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+__init__ uses __pydantic_self__ instead of the more common self for the first arg to
+allow self as a field name.
+
+-
+class Config¶
+Environment variables configuration.
+
+-
+env_file = '.env'¶
+
+
+
+-
+env_prefix = ''¶
+
+
+
+-
+extra = 'allow'¶
+
+
+
+
+
+-
+encryption: Encryption¶
+
+
+
+-
+gmail_host: str¶
+
+
+
+-
+gmail_pass: str¶
+
+
+
+-
+gmail_user: EmailStr¶
+
+
+
+-
+model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': None, 'env_nested_delimiter': None, 'env_prefix': '', 'extra': 'allow', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}¶
+Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
+
+
+
+-
+model_fields: ClassVar[dict[str, FieldInfo]] = {'encryption': FieldInfo(annotation=Encryption, required=False, default=<Encryption.TLS: 'TLS'>), 'gmail_host': FieldInfo(annotation=str, required=False, default='smtp.gmail.com'), 'gmail_pass': FieldInfo(annotation=str, required=True), 'gmail_user': FieldInfo(annotation=EmailStr, required=True), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, metadata=[PydanticGeneralMetadata(pattern='\\d{10}$')]), 'recipient': FieldInfo(annotation=Union[EmailStr, NoneType], required=False), 'timeout': FieldInfo(annotation=int, required=False, default=10)}¶
+Metadata about the fields defined on the model,
+mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
+This replaces Model.__fields__ from Pydantic V1.
+
+
+
+-
+phone: Optional[str]¶
+
+
+
+-
+recipient: Optional[EmailStr]¶
+
+
+
+-
+timeout: int¶
+
+
+
+
-
-class gmailconnector.models.config.Encryption(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
+class gmailconnector.models.config.Encryption(value)¶
Enum wrapper for TLS and SSL encryption.
+>>> Encryption
+
+
-
SSL: str = 'SSL'¶
@@ -570,42 +639,138 @@ Welcome to Gmail Connector’s documentation!
--
-class gmailconnector.models.config.SMSGateway¶
-Enum wrapper for different SMS gateways.
+-
+class gmailconnector.models.config.IngressConfig(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, gmail_user: EmailStr, gmail_pass: str, folder: Folder = Folder.inbox, gmail_host: str = 'imap.gmail.com', timeout: Union[int, float] = 10, **values: Any)¶
+Configure arguments for ReadEmail
and validate using pydantic
to share across modules.
+>>> IngressConfig
+
+
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+__init__ uses __pydantic_self__ instead of the more common self for the first arg to
+allow self as a field name.
+
+-
+class Config¶
+Environment variables configuration.
+
+-
+env_file = '.env'¶
+
+
+
+-
+env_prefix = ''¶
+
+
+
+-
+extra = 'allow'¶
+
+
+
+
--
-all: tuple = ('mms.att.net', 'tmomail.net', 'vtext.com', 'smsmyboostmobile.com', 'sms.cricketwireless.net', 'email.uscc.net')¶
+-
+folder: Folder¶
--
-tmobile: str = 'tmomail.net'¶
+-
+model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': None, 'env_nested_delimiter': None, 'env_prefix': '', 'extra': 'allow', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}¶
+Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
+
+
+
+-
+model_fields: ClassVar[dict[str, FieldInfo]] = {'folder': FieldInfo(annotation=Folder, required=False, default=<Folder.inbox: 'inbox'>), 'gmail_host': FieldInfo(annotation=str, required=False, default='imap.gmail.com'), 'gmail_pass': FieldInfo(annotation=str, required=True), 'gmail_user': FieldInfo(annotation=EmailStr, required=True), 'timeout': FieldInfo(annotation=Union[int, float], required=False, default=10)}¶
+Metadata about the fields defined on the model,
+mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
+This replaces Model.__fields__ from Pydantic V1.
+
+
+
+-
+timeout: Union[int, float]¶
+
+
+
+
+
+-
+class gmailconnector.models.config.SMSGatewayModel(*, att: str = 'mms.att.net', tmobile: str = 'tmomail.net', verizon: str = 'vtext.com', boost: str = 'smsmyboostmobile.com', cricket: str = 'sms.cricketwireless.net', uscellular: str = 'email.uscc.net', all: tuple = ('mms.att.net', 'tmomail.net', 'vtext.com', 'smsmyboostmobile.com', 'sms.cricketwireless.net', 'email.uscc.net'))¶
+Wrapper for SMS gateways.
+>>> SMSGatewayModel
+
+
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+__init__ uses __pydantic_self__ instead of the more common self for the first arg to
+allow self as a field name.
+
+-
+all: tuple¶
+
+
+
+-
+att: str¶
+
+
+
+-
+boost: str¶
+
+
+
+-
+cricket: str¶
+
+
+
+-
+model_config: ClassVar[ConfigDict] = {}¶
+Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
+
+
+
+-
+model_fields: ClassVar[dict[str, FieldInfo]] = {'all': FieldInfo(annotation=tuple, required=False, default=('mms.att.net', 'tmomail.net', 'vtext.com', 'smsmyboostmobile.com', 'sms.cricketwireless.net', 'email.uscc.net')), 'att': FieldInfo(annotation=str, required=False, default='mms.att.net'), 'boost': FieldInfo(annotation=str, required=False, default='smsmyboostmobile.com'), 'cricket': FieldInfo(annotation=str, required=False, default='sms.cricketwireless.net'), 'tmobile': FieldInfo(annotation=str, required=False, default='tmomail.net'), 'uscellular': FieldInfo(annotation=str, required=False, default='email.uscc.net'), 'verizon': FieldInfo(annotation=str, required=False, default='vtext.com')}¶
+Metadata about the fields defined on the model,
+mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
+This replaces Model.__fields__ from Pydantic V1.
+
+
+
+-
+tmobile: str¶
@@ -677,7 +842,7 @@ Welcome to Gmail Connector’s documentation!
-
-class gmailconnector.models.options.Folder¶
+class gmailconnector.models.options.Folder(value)¶
Wrapper for folders to choose emails from.
-
diff --git a/docs/objects.inv b/docs/objects.inv
index 291ce5f..068051e 100644
Binary files a/docs/objects.inv and b/docs/objects.inv differ
diff --git a/docs/searchindex.js b/docs/searchindex.js
index 5f25773..e47bb23 100644
--- a/docs/searchindex.js
+++ b/docs/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Gmail Connector", "Welcome to Gmail Connector\u2019s documentation!"], "terms": {"python": 0, "ani": [0, 1], "folder": [0, 1], "As": 0, "mai": 0, "30": 0, "2022": 0, "googl": 0, "longer": 0, "support": 0, "third": 0, "parti": 0, "applic": 0, "access": [0, 1], "account": 0, "onli": [0, 1], "us": [0, 1], "usernam": [0, 1], "password": [0, 1], "which": [0, 1], "wa": [0, 1], "origin": 0, "avail": [0, 1], "through": [0, 1], "lesssecureapp": 0, "an": [0, 1], "altern": 0, "approach": 0, "i": [0, 1], "gener": [0, 1], "apppassword": 0, "instead": 0, "refer": [0, 1], "http": [0, 1], "com": [0, 1], "answer": [0, 1], "6010255": 0, "pip": 0, "environ": 0, "variabl": [0, 1], "can": [0, 1], "load": 0, "from": [0, 1], "file": [0, 1], "For": 0, "authent": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "account_password": 0, "outbound": 0, "phone": [0, 1], "1234567890": 0, "option": 0, "also": 0, "scan": 0, "import": [0, 1], "gmailconnector": [0, 1], "gc": 0, "load_env": 0, "true": [0, 1], "sms_object": 0, "sendsm": [0, 1], "encrypt": [0, 1], "ssl": [0, 1], "auth": 0, "happen": 0, "befor": [0, 1], "instanti": [0, 1], "separ": 0, "assert": 0, "ok": [0, 1], "bodi": [0, 1], "respons": [0, 1], "send_sm": [0, 1], "11234567890": [0, 1], "messag": [0, 1], "test": 0, "sms_gatewai": [0, 1], "smsgatewai": [0, 1], "verizon": [0, 1], "delete_s": [0, 1], "set": [0, 1], "fals": [0, 1], "keep": 0, "sent": 0, "json": [0, 1], "print": 0, "more": 0, "warn": 0, "": 0, "gatewai": [0, 1], "ha": [0, 1], "payload": 0, "limit": 0, "so": [0, 1], "recommend": 0, "break": 0, "larger": 0, "multipl": [0, 1], "subject": [0, 1], "default": [0, 1], "_": 0, "carrier": [0, 1], "tmomail": [0, 1], "net": [0, 1], "sinc": [0, 1], "t": 0, "mobil": [0, 1], "delet": 0, "boolean": [0, 1], "flag": [0, 1], "sentitem": [0, 1], "If": 0, "known": 0, "ensur": 0, "proper": 0, "deliveri": 0, "mail_object": 0, "sendemail": [0, 1], "send_email": [0, 1], "beforehand": 0, "basic": 0, "recipi": [0, 1], "howdi": 0, "To": 0, "verifi": 0, "requir": 0, "smtp": [0, 1], "port": [0, 1], "25": [0, 1], "validation_result": 0, "validate_email": [0, 1], "email_address": [0, 1], "someon": 0, "exampl": [0, 1], "valid": 0, "found": 0, "address": 0, "elif": 0, "invalid": [0, 1], "els": 0, "incomplet": 0, "couldn": 0, "mostli": 0, "becaus": 0, "block": [0, 1], "isp": 0, "o": 0, "differ": [0, 1], "case": 0, "add": [0, 1], "attach": [0, 1], "without": [0, 1], "custom": 0, "filenam": [0, 1], "imag": 0, "path": [0, 1], "join": 0, "getcwd": 0, "listdir": 0, "name": [0, 1], "appl": 0, "flower": 0, "balloon": 0, "1": [0, 1], "2": [0, 1], "dictionari": [0, 1], "custom_attach": [0, 1], "dict": [0, 1], "zip": 0, "3": 0, "list": [0, 1], "4": 0, "singl": 0, "random_apple_xroamutiypa": 0, "jpeg": 0, "blank": 0, "html": [0, 1], "format": [0, 1], "inlin": 0, "public": 0, "src": 0, "itself": [0, 1], "sender": [0, 1], "cc": [0, 1], "whom": [0, 1], "d": [0, 1], "bcc": [0, 1], "than": [0, 1], "one": 0, "wrap": 0, "username1": 0, "username2": 0, "datetim": [0, 1], "reader": 0, "reademail": [0, 1], "all": [0, 1], "filter1": 0, "condit": [0, 1], "date": [0, 1], "year": 0, "2010": 0, "month": 0, "5": [0, 1], "dai": 0, "filter2": 0, "secur": 0, "alert": 0, "filter3": 0, "categori": [0, 1], "not_delet": [0, 1], "filter": [0, 1], "appli": 0, "same": [0, 1], "time": [0, 1], "each_mail": 0, "read_mail": [0, 1], "humanize_datetim": [0, 1], "get": [0, 1], "object": [0, 1], "date_tim": 0, "sender_email": 0, "precommit": 0, "doc": 0, "creation": 0, "ar": 0, "run": 0, "everi": 0, "commit": 0, "sphinx": 0, "pre": 0, "20": 0, "0": [0, 1], "recommonmark": 0, "7": 0, "m": 0, "gitvers": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": [0, 1], "vignesh": 0, "sivanandha": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "env": 1, "var": 1, "usag": 1, "licens": 1, "copyright": 1, "class": 1, "str": 1, "none": 1, "timeout": 1, "union": 1, "int": 1, "float": 1, "10": 1, "gmail_host": 1, "__str__": 1, "tl": 1, "initi": 1, "messeng": 1, "number": 1, "provid": 1, "necessari": 1, "arg": 1, "paramet": 1, "lib": 1, "connect": 1, "type": 1, "hostnam": 1, "server": 1, "properti": 1, "return": 1, "A": 1, "statu": 1, "user": 1, "create_ssl_connect": 1, "host": 1, "creat": 1, "create_tls_connect": 1, "static": 1, "generate_address": 1, "digit": 1, "form": 1, "endpoint": 1, "bool": 1, "text": 1, "destin": 1, "content": 1, "line": 1, "take": 1, "argument": 1, "item": 1, "encod": 1, "ascii": 1, "ignor": 1, "decod": 1, "thi": 1, "done": 1, "special": 1, "charact": 1, "like": 1, "rais": 1, "unicodeencodeerror": 1, "try": 1, "note": 1, "other": 1, "includ": 1, "replac": 1, "xmlcharrefreplac": 1, "validate_phon": 1, "pass": 1, "dure": 1, "sms_delet": 1, "deletes": 1, "kwarg": 1, "member": 1, "right": 1, "after": 1, "invok": 1, "thread_executor": 1, "sweep": 1, "depend": 1, "exist": 1, "item_id": 1, "byte": 1, "thread": 1, "just": 1, "id": 1, "defin": 1, "587": 1, "multipart_messag": 1, "html_bodi": 1, "mimemultipart": 1, "multipart": 1, "given": 1, "version": 1, "pathlik": 1, "fail_if_attach_fail": 1, "filepath": 1, "kei": 1, "valu": 1, "restrict": 1, "fail": 1, "them": 1, "read_email": 1, "inbox": 1, "imap": 1, "yield": 1, "accord": 1, "where": 1, "have": 1, "imapcli": 1, "readthedoc": 1, "en": 1, "_modul": 1, "xlist_fold": 1, "broad": 1, "claus": 1, "catch": 1, "login": 1, "error": 1, "imaplib": 1, "get_info": 1, "response_part": 1, "tupl": 1, "dt_flag": 1, "extract": 1, "receiv": 1, "part": 1, "whether": 1, "convert": 1, "human": 1, "readabl": 1, "inform": 1, "iter": 1, "unseen": 1, "search": 1, "api": 1, "contain": 1, "code": 1, "match": 1, "criteria": 1, "method": 1, "debug": 1, "smtp_check": 1, "logger": 1, "log": 1, "deliv": 1, "abil": 1, "second": 1, "wait": 1, "result": 1, "enabl": 1, "check": 1, "bring": 1, "your": 1, "own": 1, "clearli": 1, "mx": 1, "record": 1, "temporari": 1, "emailaddress": 1, "validateaddress": 1, "split": 1, "domin": 1, "further": 1, "ipv4address": 1, "ipv6address": 1, "get_mx_record": 1, "mail": 1, "exchang": 1, "fqdn": 1, "fulli": 1, "qualifi": 1, "ip": 1, "authorit": 1, "non": 1, "section": 1, "addressformaterror": 1, "invaliddomain": 1, "notmailserv": 1, "unresponsivemailserv": 1, "unrespons": 1, "modul": 1, "qualnam": 1, "start": 1, "boundari": 1, "enum": 1, "wrapper": 1, "mm": 1, "att": 1, "vtext": 1, "smsmyboostmobil": 1, "cricketwireless": 1, "uscc": 1, "boost": 1, "cricket": 1, "tmobil": 1, "uscellular": 1, "while": 1, "NOT": 1, "seen": 1, "retriev": 1, "small": 1, "size": 1, "smaller": 1, "particular": 1, "present": 1, "choos": 1, "draft": 1, "spam": 1, "star": 1, "trash": 1, "turn": 1, "insert": 1, "pair": 1, "count": 1, "un": 1, "extra": 1, "base": 1, "index": 1, "page": 1}, "objects": {"gmailconnector.models": [[1, 0, 0, "-", "config"], [1, 0, 0, "-", "options"], [1, 0, 0, "-", "responder"]], "gmailconnector.models.config": [[1, 1, 1, "", "Encryption"], [1, 1, 1, "", "SMSGateway"]], "gmailconnector.models.config.Encryption": [[1, 2, 1, "", "SSL"], [1, 2, 1, "", "TLS"]], "gmailconnector.models.config.SMSGateway": [[1, 2, 1, "", "all"], [1, 2, 1, "", "att"], [1, 2, 1, "", "boost"], [1, 2, 1, "", "cricket"], [1, 2, 1, "", "tmobile"], [1, 2, 1, "", "uscellular"], [1, 2, 1, "", "verizon"]], "gmailconnector.models.options": [[1, 1, 1, "", "Category"], [1, 1, 1, "", "Condition"], [1, 1, 1, "", "Folder"]], "gmailconnector.models.options.Category": [[1, 2, 1, "", "all"], [1, 2, 1, "", "flagged"], [1, 2, 1, "", "not_deleted"], [1, 2, 1, "", "seen"], [1, 2, 1, "", "unseen"]], "gmailconnector.models.options.Condition": [[1, 3, 1, "", "since"], [1, 3, 1, "", "small"], [1, 3, 1, "", "subject"], [1, 3, 1, "", "text"]], "gmailconnector.models.options.Folder": [[1, 2, 1, "", "all"], [1, 2, 1, "", "drafts"], [1, 2, 1, "", "important"], [1, 2, 1, "", "inbox"], [1, 2, 1, "", "sent"], [1, 2, 1, "", "spam"], [1, 2, 1, "", "starred"], [1, 2, 1, "", "trash"]], "gmailconnector.models.responder": [[1, 1, 1, "", "Email"], [1, 1, 1, "", "Response"]], "gmailconnector.models.responder.Response": [[1, 4, 1, "", "body"], [1, 4, 1, "", "count"], [1, 4, 1, "", "extra"], [1, 3, 1, "", "json"], [1, 4, 1, "", "ok"], [1, 4, 1, "", "status"]], "gmailconnector": [[1, 0, 0, "-", "read_email"], [1, 0, 0, "-", "send_email"], [1, 0, 0, "-", "send_sms"], [1, 0, 0, "-", "sms_deleter"]], "gmailconnector.read_email": [[1, 1, 1, "", "ReadEmail"]], "gmailconnector.read_email.ReadEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "get_info"], [1, 3, 1, "", "instantiate"], [1, 3, 1, "", "read_mail"]], "gmailconnector.send_email": [[1, 1, 1, "", "SendEmail"], [1, 5, 1, "", "validate_email"]], "gmailconnector.send_email.SendEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "multipart_message"], [1, 3, 1, "", "send_email"]], "gmailconnector.send_sms": [[1, 1, 1, "", "SendSMS"]], "gmailconnector.send_sms.SendSMS": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "generate_address"], [1, 3, 1, "", "send_sms"], [1, 3, 1, "", "validate_phone"]], "gmailconnector.sms_deleter": [[1, 1, 1, "", "DeleteSent"]], "gmailconnector.sms_deleter.DeleteSent": [[1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "delete_sent"], [1, 3, 1, "", "thread_executor"]], "gmailconnector.validator": [[1, 0, 0, "-", "address"], [1, 0, 0, "-", "domain"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "validate_email"]], "gmailconnector.validator.address": [[1, 1, 1, "", "EmailAddress"]], "gmailconnector.validator.address.EmailAddress": [[1, 4, 1, "", "domain"], [1, 4, 1, "", "email"], [1, 4, 1, "", "user"]], "gmailconnector.validator.domain": [[1, 5, 1, "", "get_mx_records"]], "gmailconnector.validator.exceptions": [[1, 6, 1, "", "AddressFormatError"], [1, 6, 1, "", "InvalidDomain"], [1, 6, 1, "", "NotMailServer"], [1, 6, 1, "", "UnresponsiveMailServer"]], "gmailconnector.validator.validate_email": [[1, 5, 1, "", "validate_email"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"gmail": [0, 1], "connector": [0, 1], "instal": 0, "env": 0, "var": 0, "usag": 0, "send": [0, 1], "sm": [0, 1], "addit": 0, "arg": 0, "email": [0, 1], "read": [0, 1], "lint": 0, "releas": 0, "note": 0, "pypi": 0, "modul": 0, "runbook": 0, "repositori": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "me": 1, "delet": 1, "sent": 1, "valid": 1, "address": 1, "domain": 1, "custom": 1, "except": 1, "model": 1, "config": 1, "option": 1, "respond": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Gmail Connector", "Welcome to Gmail Connector\u2019s documentation!"], "terms": {"python": 0, "ani": [0, 1], "folder": [0, 1], "As": 0, "mai": 0, "30": 0, "2022": 0, "googl": 0, "longer": 0, "support": 0, "third": 0, "parti": 0, "applic": 0, "access": [0, 1], "account": 0, "onli": [0, 1], "us": [0, 1], "usernam": [0, 1], "password": [0, 1], "which": [0, 1], "wa": [0, 1], "origin": 0, "avail": [0, 1], "through": [0, 1], "lesssecureapp": 0, "an": [0, 1], "altern": 0, "approach": 0, "i": [0, 1], "gener": [0, 1], "apppassword": 0, "instead": [0, 1], "refer": [0, 1], "http": [0, 1], "com": [0, 1], "answer": [0, 1], "6010255": 0, "pip": 0, "environ": [0, 1], "variabl": [0, 1], "can": [0, 1], "load": 0, "from": [0, 1], "file": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "account_password": 0, "custom": 0, "To": 0, "set": [0, 1], "filenam": [0, 1], "env_fil": [0, 1], "befor": [0, 1], "import": [0, 1], "gmailconnector": [0, 1], "o": 0, "gc": 0, "avoid": 0, "argument": [0, 1], "dure": [0, 1], "object": [0, 1], "instanti": [0, 1], "kwarg": [0, 1], "dict": [0, 1], "email_address": [0, 1], "encrypt": [0, 1], "ssl": [0, 1], "timeout": [0, 1], "5": [0, 1], "email_obj": 0, "sendemail": [0, 1], "sms_object": 0, "sendsm": [0, 1], "auth": 0, "authent": [0, 1], "happen": 0, "separ": 0, "assert": 0, "ok": [0, 1], "bodi": [0, 1], "respons": [0, 1], "send_sm": [0, 1], "phone": [0, 1], "11234567890": [0, 1], "messag": [0, 1], "test": 0, "sms_gatewai": [0, 1], "smsgatewai": 0, "verizon": [0, 1], "delete_s": [0, 1], "true": [0, 1], "fals": [0, 1], "keep": 0, "sent": 0, "json": [0, 1], "print": 0, "more": [0, 1], "warn": 0, "": 0, "gatewai": [0, 1], "ha": [0, 1], "payload": 0, "limit": 0, "so": [0, 1], "recommend": 0, "break": 0, "larger": 0, "multipl": [0, 1], "subject": [0, 1], "default": [0, 1], "_": 0, "carrier": [0, 1], "tmomail": [0, 1], "net": [0, 1], "sinc": [0, 1], "t": 0, "mobil": [0, 1], "delet": 0, "boolean": [0, 1], "flag": [0, 1], "outbound": 0, "sentitem": [0, 1], "If": 0, "known": 0, "ensur": 0, "proper": 0, "deliveri": 0, "mail_object": 0, "send_email": [0, 1], "beforehand": 0, "basic": 0, "recipi": [0, 1], "howdi": 0, "verifi": 0, "requir": [0, 1], "smtp": [0, 1], "port": [0, 1], "25": [0, 1], "validation_result": 0, "validate_email": [0, 1], "someon": 0, "exampl": [0, 1], "valid": 0, "found": 0, "address": 0, "elif": 0, "invalid": [0, 1], "els": 0, "incomplet": 0, "couldn": 0, "mostli": 0, "becaus": 0, "block": [0, 1], "isp": 0, "differ": 0, "case": 0, "add": [0, 1], "attach": [0, 1], "without": [0, 1], "imag": 0, "path": [0, 1], "join": 0, "getcwd": 0, "listdir": 0, "name": [0, 1], "appl": 0, "flower": 0, "balloon": 0, "1": [0, 1], "2": [0, 1], "dictionari": [0, 1], "custom_attach": [0, 1], "zip": 0, "3": 0, "list": [0, 1], "4": 0, "singl": 0, "random_apple_xroamutiypa": 0, "jpeg": 0, "blank": 0, "html": [0, 1], "format": [0, 1], "inlin": 0, "public": 0, "src": 0, "itself": [0, 1], "sender": [0, 1], "cc": [0, 1], "whom": [0, 1], "d": [0, 1], "bcc": [0, 1], "than": [0, 1], "one": 0, "wrap": 0, "username1": 0, "username2": 0, "datetim": [0, 1], "reader": 0, "reademail": [0, 1], "all": [0, 1], "filter1": 0, "condit": [0, 1], "date": [0, 1], "year": 0, "2010": 0, "month": 0, "dai": 0, "filter2": 0, "secur": 0, "alert": 0, "filter3": 0, "categori": [0, 1], "not_delet": [0, 1], "filter": [0, 1], "appli": 0, "same": [0, 1], "time": [0, 1], "each_mail": 0, "read_mail": [0, 1], "humanize_datetim": [0, 1], "get": [0, 1], "date_tim": 0, "sender_email": 0, "precommit": 0, "doc": 0, "creation": 0, "ar": 0, "run": 0, "everi": 0, "commit": 0, "sphinx": 0, "pre": 0, "20": 0, "0": [0, 1], "recommonmark": 0, "7": 0, "m": 0, "gitvers": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": [0, 1], "vignesh": 0, "sivanandha": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "env": 1, "var": 1, "usag": 1, "licens": 1, "copyright": 1, "class": 1, "egressconfig": 1, "initi": 1, "messeng": 1, "number": 1, "provid": 1, "necessari": 1, "arg": 1, "creat": 1, "connect": 1, "host": 1, "base": 1, "chosen": 1, "type": 1, "lib": 1, "gmail_host": 1, "hostnam": 1, "server": 1, "properti": 1, "return": 1, "A": 1, "statu": 1, "user": 1, "create_ssl_connect": 1, "str": 1, "union": 1, "int": 1, "float": 1, "none": 1, "create_tls_connect": 1, "tl": 1, "static": 1, "generate_address": 1, "digit": 1, "form": 1, "endpoint": 1, "smsgatewaymodel": 1, "att": 1, "mm": 1, "tmobil": 1, "vtext": 1, "boost": 1, "smsmyboostmobil": 1, "cricket": 1, "cricketwireless": 1, "uscellular": 1, "uscc": 1, "bool": 1, "text": 1, "destin": 1, "paramet": 1, "content": 1, "line": 1, "take": 1, "item": 1, "encod": 1, "ascii": 1, "ignor": 1, "decod": 1, "thi": 1, "done": 1, "special": 1, "charact": 1, "like": 1, "rais": 1, "unicodeencodeerror": 1, "try": 1, "note": 1, "other": 1, "includ": 1, "replac": 1, "xmlcharrefreplac": 1, "sms_delet": 1, "deletes": 1, "member": 1, "right": 1, "after": 1, "invok": 1, "thread_executor": 1, "sweep": 1, "depend": 1, "exist": 1, "item_id": 1, "byte": 1, "thread": 1, "just": 1, "id": 1, "defin": 1, "multipart_messag": 1, "html_bodi": 1, "mimemultipart": 1, "multipart": 1, "pass": 1, "given": 1, "version": 1, "pathlik": 1, "fail_if_attach_fail": 1, "filepath": 1, "kei": 1, "valu": 1, "restrict": 1, "fail": 1, "them": 1, "read_email": 1, "ingressconfig": 1, "yield": 1, "accord": 1, "where": 1, "have": 1, "imapcli": 1, "readthedoc": 1, "en": 1, "_modul": 1, "xlist_fold": 1, "broad": 1, "claus": 1, "catch": 1, "login": 1, "error": 1, "imaplib": 1, "get_info": 1, "response_part": 1, "tupl": 1, "dt_flag": 1, "extract": 1, "receiv": 1, "part": 1, "whether": 1, "convert": 1, "human": 1, "readabl": 1, "inform": 1, "iter": 1, "__str__": 1, "unseen": 1, "search": 1, "api": 1, "contain": 1, "code": 1, "match": 1, "criteria": 1, "method": 1, "debug": 1, "smtp_check": 1, "logger": 1, "log": 1, "deliv": 1, "abil": 1, "second": 1, "wait": 1, "result": 1, "enabl": 1, "check": 1, "bring": 1, "your": 1, "own": 1, "clearli": 1, "mx": 1, "record": 1, "temporari": 1, "emailaddress": 1, "validateaddress": 1, "split": 1, "domin": 1, "further": 1, "ipv4address": 1, "ipv6address": 1, "get_mx_record": 1, "mail": 1, "exchang": 1, "fqdn": 1, "fulli": 1, "qualifi": 1, "ip": 1, "authorit": 1, "non": 1, "section": 1, "addressformaterror": 1, "invaliddomain": 1, "notmailserv": 1, "unresponsivemailserv": 1, "unrespons": 1, "_case_sensit": 1, "_env_prefix": 1, "_env_fil": 1, "dotenvtyp": 1, "posixpath": 1, "_env_file_encod": 1, "_env_nested_delimit": 1, "_secrets_dir": 1, "emailstr": 1, "10": 1, "configur": 1, "pydant": 1, "share": 1, "across": 1, "modul": 1, "new": 1, "pars": 1, "input": 1, "data": 1, "keyword": 1, "validationerror": 1, "pydantic_cor": 1, "cannot": 1, "__init__": 1, "__pydantic_self__": 1, "common": 1, "self": 1, "first": 1, "allow": 1, "field": 1, "env_prefix": 1, "extra": 1, "model_config": 1, "classvar": 1, "settingsconfigdict": 1, "arbitrary_types_allow": 1, "case_sensit": 1, "env_file_encod": 1, "env_nested_delimit": 1, "protected_namespac": 1, "model_": 1, "settings_": 1, "secrets_dir": 1, "validate_default": 1, "should": 1, "conform": 1, "configdict": 1, "model_field": 1, "fieldinfo": 1, "annot": 1, "nonetyp": 1, "metadata": 1, "pydanticgeneralmetadata": 1, "pattern": 1, "about": 1, "map": 1, "__fields__": 1, "v1": 1, "enum": 1, "wrapper": 1, "inbox": 1, "imap": 1, "while": 1, "NOT": 1, "seen": 1, "retriev": 1, "small": 1, "size": 1, "smaller": 1, "particular": 1, "present": 1, "choos": 1, "draft": 1, "spam": 1, "star": 1, "trash": 1, "turn": 1, "insert": 1, "pair": 1, "count": 1, "un": 1, "index": 1, "page": 1}, "objects": {"gmailconnector.models": [[1, 0, 0, "-", "config"], [1, 0, 0, "-", "options"], [1, 0, 0, "-", "responder"]], "gmailconnector.models.config": [[1, 1, 1, "", "EgressConfig"], [1, 1, 1, "", "Encryption"], [1, 1, 1, "", "IngressConfig"], [1, 1, 1, "", "SMSGatewayModel"]], "gmailconnector.models.config.EgressConfig": [[1, 1, 1, "", "Config"], [1, 2, 1, "", "encryption"], [1, 2, 1, "", "gmail_host"], [1, 2, 1, "", "gmail_pass"], [1, 2, 1, "", "gmail_user"], [1, 2, 1, "", "model_config"], [1, 2, 1, "", "model_fields"], [1, 2, 1, "", "phone"], [1, 2, 1, "", "recipient"], [1, 2, 1, "", "timeout"]], "gmailconnector.models.config.EgressConfig.Config": [[1, 2, 1, "", "env_file"], [1, 2, 1, "", "env_prefix"], [1, 2, 1, "", "extra"]], "gmailconnector.models.config.Encryption": [[1, 2, 1, "", "SSL"], [1, 2, 1, "", "TLS"]], "gmailconnector.models.config.IngressConfig": [[1, 1, 1, "", "Config"], [1, 2, 1, "", "folder"], [1, 2, 1, "", "gmail_host"], [1, 2, 1, "", "gmail_pass"], [1, 2, 1, "", "gmail_user"], [1, 2, 1, "", "model_config"], [1, 2, 1, "", "model_fields"], [1, 2, 1, "", "timeout"]], "gmailconnector.models.config.IngressConfig.Config": [[1, 2, 1, "", "env_file"], [1, 2, 1, "", "env_prefix"], [1, 2, 1, "", "extra"]], "gmailconnector.models.config.SMSGatewayModel": [[1, 2, 1, "", "all"], [1, 2, 1, "", "att"], [1, 2, 1, "", "boost"], [1, 2, 1, "", "cricket"], [1, 2, 1, "", "model_config"], [1, 2, 1, "", "model_fields"], [1, 2, 1, "", "tmobile"], [1, 2, 1, "", "uscellular"], [1, 2, 1, "", "verizon"]], "gmailconnector.models.options": [[1, 1, 1, "", "Category"], [1, 1, 1, "", "Condition"], [1, 1, 1, "", "Folder"]], "gmailconnector.models.options.Category": [[1, 2, 1, "", "all"], [1, 2, 1, "", "flagged"], [1, 2, 1, "", "not_deleted"], [1, 2, 1, "", "seen"], [1, 2, 1, "", "unseen"]], "gmailconnector.models.options.Condition": [[1, 3, 1, "", "since"], [1, 3, 1, "", "small"], [1, 3, 1, "", "subject"], [1, 3, 1, "", "text"]], "gmailconnector.models.options.Folder": [[1, 2, 1, "", "all"], [1, 2, 1, "", "drafts"], [1, 2, 1, "", "important"], [1, 2, 1, "", "inbox"], [1, 2, 1, "", "sent"], [1, 2, 1, "", "spam"], [1, 2, 1, "", "starred"], [1, 2, 1, "", "trash"]], "gmailconnector.models.responder": [[1, 1, 1, "", "Email"], [1, 1, 1, "", "Response"]], "gmailconnector.models.responder.Response": [[1, 4, 1, "", "body"], [1, 4, 1, "", "count"], [1, 4, 1, "", "extra"], [1, 3, 1, "", "json"], [1, 4, 1, "", "ok"], [1, 4, 1, "", "status"]], "gmailconnector": [[1, 0, 0, "-", "read_email"], [1, 0, 0, "-", "send_email"], [1, 0, 0, "-", "send_sms"], [1, 0, 0, "-", "sms_deleter"]], "gmailconnector.read_email": [[1, 1, 1, "", "ReadEmail"]], "gmailconnector.read_email.ReadEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "get_info"], [1, 3, 1, "", "instantiate"], [1, 3, 1, "", "read_mail"]], "gmailconnector.send_email": [[1, 1, 1, "", "SendEmail"], [1, 5, 1, "", "validate_email"]], "gmailconnector.send_email.SendEmail": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "multipart_message"], [1, 3, 1, "", "send_email"]], "gmailconnector.send_sms": [[1, 1, 1, "", "SendSMS"]], "gmailconnector.send_sms.SendSMS": [[1, 4, 1, "", "authenticate"], [1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "create_tls_connection"], [1, 3, 1, "", "generate_address"], [1, 3, 1, "", "send_sms"]], "gmailconnector.sms_deleter": [[1, 1, 1, "", "DeleteSent"]], "gmailconnector.sms_deleter.DeleteSent": [[1, 3, 1, "", "create_ssl_connection"], [1, 3, 1, "", "delete_sent"], [1, 3, 1, "", "thread_executor"]], "gmailconnector.validator": [[1, 0, 0, "-", "address"], [1, 0, 0, "-", "domain"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "validate_email"]], "gmailconnector.validator.address": [[1, 1, 1, "", "EmailAddress"]], "gmailconnector.validator.address.EmailAddress": [[1, 4, 1, "", "domain"], [1, 4, 1, "", "email"], [1, 4, 1, "", "user"]], "gmailconnector.validator.domain": [[1, 5, 1, "", "get_mx_records"]], "gmailconnector.validator.exceptions": [[1, 6, 1, "", "AddressFormatError"], [1, 6, 1, "", "InvalidDomain"], [1, 6, 1, "", "NotMailServer"], [1, 6, 1, "", "UnresponsiveMailServer"]], "gmailconnector.validator.validate_email": [[1, 5, 1, "", "validate_email"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"gmail": [0, 1], "connector": [0, 1], "instal": 0, "env": 0, "var": 0, "usag": 0, "send": [0, 1], "sm": [0, 1], "addit": 0, "arg": 0, "email": [0, 1], "read": [0, 1], "lint": 0, "releas": 0, "note": 0, "pypi": 0, "modul": 0, "runbook": 0, "repositori": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "me": 1, "delet": 1, "sent": 1, "valid": 1, "address": 1, "domain": 1, "custom": 1, "except": 1, "model": 1, "config": 1, "option": 1, "respond": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
diff --git a/gmailconnector/read_email.py b/gmailconnector/read_email.py
index 7eaa0aa..edd49f5 100644
--- a/gmailconnector/read_email.py
+++ b/gmailconnector/read_email.py
@@ -7,7 +7,6 @@
from typing import Iterable, Union
import pytz
-from typing_extensions import Unpack
from .models.config import IngressConfig
from .models.options import Category, Condition
@@ -23,7 +22,7 @@ class ReadEmail:
LOCAL_TIMEZONE = datetime.now(timezone.utc).astimezone().tzinfo
- def __init__(self, **kwargs: Unpack[IngressConfig]):
+ def __init__(self, **kwargs: IngressConfig):
"""Initiates necessary args, creates a connection with Gmail host to read emails from the chosen folder.
kwargs:
diff --git a/gmailconnector/send_email.py b/gmailconnector/send_email.py
index 3313587..3a8c26b 100644
--- a/gmailconnector/send_email.py
+++ b/gmailconnector/send_email.py
@@ -6,8 +6,6 @@
from email.mime.text import MIMEText
from typing import Dict, Union
-from typing_extensions import Unpack
-
from .models.config import EgressConfig, Encryption
from .models.responder import Response
from .validator.address import EmailAddress
@@ -28,7 +26,7 @@ class SendEmail:
"""
- def __init__(self, **kwargs: Unpack[EgressConfig]):
+ def __init__(self, **kwargs: EgressConfig):
"""Initiates necessary args, creates a connection with Gmail host based on chosen encryption type.
kwargs:
diff --git a/gmailconnector/send_sms.py b/gmailconnector/send_sms.py
index e5053c3..a3d6c17 100644
--- a/gmailconnector/send_sms.py
+++ b/gmailconnector/send_sms.py
@@ -2,8 +2,6 @@
import socket
from typing import Union
-from typing_extensions import Unpack
-
from .models.config import EgressConfig, Encryption, SMSGateway
from .models.responder import Response
from .sms_deleter import DeleteSent
@@ -16,7 +14,7 @@ class SendSMS:
"""
- def __init__(self, **kwargs: Unpack[EgressConfig]):
+ def __init__(self, **kwargs: EgressConfig):
"""Initiates necessary args, creates a connection with Gmail host based on chosen encryption type.
kwargs: