All abilities to send alert msgs
Reason this release was yanked:
while not used anywhere use new vertion!
Project description
private_values
Features
- send emails
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
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 = EnvValues.get("myCustomPrivateEnvName")
3. change other settings
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.send(subject="Hello", body="World!")
- with mods
from alerts_msg import *
class AlertSmtpMOD(AlertSmtp):
pass # changed
AlertSmtpMOD.send(subject="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.1.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for alerts_msg-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4bc6b7db92b4835fc740fe26aa307fd507b2b49d6f637c756b4882e329d2c8d |
|
MD5 | 8cd826fee7fbde03f154e5f38370a67c |
|
BLAKE2b-256 | 2c312705ef56772f0986a87d7da6071e597321c02d86250b32eff61995bafcda |