All abilities to send alert msgs (threading)
Reason this release was yanked:
while not used anywhere use new vertion!
Project description
alerts_msg
Features
- send emails (threading!)
License
See the LICENSE file for license rights and limitations (MIT).
Release history
See the HISTORY.md file for release history.
Installation
pip install alerts_msg
Import
from alerts_msg import *
GUIDE
See tests and source for other examples.
AlertSmtp
1. add new server if not exists
from alerts_msg import *
class SmtpServersMOD(SmtpServers):
EXAMPLE_RU: SmtpAddress = SmtpAddress("smtp.EXAMPLE.ru", 123)
class AlertSmtpMOD(AlertSmtp):
SERVER: SmtpAddress = SmtpServersMOD.EXAMPLE_RU # or direct =SmtpAddress("smtp.EXAMPLE.ru", 123)
2. change authorisation data (see module private_values
for details)
from alerts_msg import *
class AlertSmtpMOD(AlertSmtp):
SMTP_USER: str = "example@mail.ru"
SMTP_PWD: str = PrivateEnv.get("myCustomPrivateEnvName")
3. change other settings (see source for other not mentioned)
from alerts_msg import *
class AlertSmtpMOD(AlertSmtp):
TIMEOUT_RECONNECT: int = 60
RECONNECT_LIMIT: int = 10
TIMEOUT_RATELIMIT: int = 600
RECIPIENT: str = "my_address_2@mail.ru"
4. send
- if no mods
from alerts_msg import *
AlertSmtp(subj_suffix="Hello", body="World!")
- with mods
from alerts_msg import *
class AlertSmtpMOD(AlertSmtp):
pass # changed
AlertSmtpMOD(subj_suffix="Hello", body="World!")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alerts_msg-0.0.2.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for alerts_msg-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d09450b148bebffdb8ddde3aa2bf3619116dda70e3b6913b3f585ac964e915 |
|
MD5 | fe7fe5a5da8129bf0ffa5c3f0a33bcef |
|
BLAKE2b-256 | 971585c4fcf1a4b202327beec9eaa6055f44d805bed44da4848fe480a90a3ebb |