Metadata-Version: 2.1
Name: message-local
Version: 0.0.10
Home-page: https://github.com/circles-zone/message-local-python-package
Author: Circles
Author-email: info@circles.life
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: item-local>=0.0.4
Requires-Dist: sms-message-aws-sns-local>=0.0.7
Requires-Dist: api-management-local>=0.0.27

# Abstract Message

## Usage:
    
```python
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

  ```
