ecodev-core 0.0.27__tar.gz → 0.0.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ecodev-core might be problematic. Click here for more details.
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/PKG-INFO +1 -1
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/email_sender.py +2 -3
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/pyproject.toml +1 -1
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/LICENSE.md +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/README.md +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/__init__.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/app_activity.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/app_rights.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/app_user.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/auth_configuration.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/authentication.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/backup.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/check_dependencies.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/custom_equal.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/db_connection.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/db_filters.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/db_insertion.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/db_retrieval.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/enum_utils.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/list_utils.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/logger.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/pandas_utils.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/permissions.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/pydantic_utils.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/read_write.py +0 -0
- {ecodev_core-0.0.27 → ecodev_core-0.0.28}/ecodev_core/safe_utils.py +0 -0
|
@@ -7,7 +7,6 @@ from email.mime.text import MIMEText
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from smtplib import SMTP
|
|
9
9
|
from ssl import create_default_context
|
|
10
|
-
from typing import Dict
|
|
11
10
|
|
|
12
11
|
from pydantic_settings import BaseSettings
|
|
13
12
|
from pydantic_settings import SettingsConfigDict
|
|
@@ -26,7 +25,7 @@ class EmailAuth(BaseSettings):
|
|
|
26
25
|
EMAIL_AUTH = EmailAuth()
|
|
27
26
|
|
|
28
27
|
|
|
29
|
-
def send_email(email: str, body: str, topic: str, images:
|
|
28
|
+
def send_email(email: str, body: str, topic: str, images: dict[str, Path] | None = None) -> None:
|
|
30
29
|
"""
|
|
31
30
|
Generic email sender.
|
|
32
31
|
|
|
@@ -41,7 +40,7 @@ def send_email(email: str, body: str, topic: str, images: Dict[str, Path]) -> No
|
|
|
41
40
|
em['To'] = email
|
|
42
41
|
em['Subject'] = topic
|
|
43
42
|
em.attach(MIMEText(body, 'html'))
|
|
44
|
-
for tag, img_path in images.items():
|
|
43
|
+
for tag, img_path in (images or {}).items():
|
|
45
44
|
with open(img_path, 'rb') as fp:
|
|
46
45
|
img = MIMEImage(fp.read())
|
|
47
46
|
img.add_header('Content-ID', f'<{tag}>')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|