No project description provided
Project description
Abstract Message
Usage:
from message_local.Message import Message, Importance
# SpecialMessage for example SMSMessage, WhatsApp Message, EmailMessage
class SpecialMessage(Message):
def __init__(self, body: str, importance: Importance, subject: str = None) -> None:
super().__init__(body, importance, subject) # now you got self.body, self.importance and self.subject (optional)
def send(self, recipients: list, cc: list = None): # cc and bcc are optional
logger.info("Message sent to " + " ".join(recipients))
def was_read(self):
return True
def display(self):
logger.info("Message displayed")
def _can_send(self) -> bool:
"""Implement this with API management https://github.com/circles-zone/api-management-local-python-package"""
pass
def _after_send_attempt(self) -> None:
"""Update the DB if sent successfully, or with the problem details"""
pass
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
message-local-0.0.13.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for message_local-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19d0d2605f12fe223ffb8c328acd3ef9357f1e70c05e5907c2acf56202c17d81 |
|
MD5 | 8e92e5ec454987ee86e5aa413e61cc32 |
|
BLAKE2b-256 | 2d85a54de9fc8d8d7c537c0095d25cf2a0675347c241c546716d15d7ae5a5e3d |