Include at requirements.txt
:
git+https://github.com/devraccoon/raccoon_notifier
setup(
...
install_requires=[
...
'raccoon-notifier',
...
],
...
dependency_links=['https://github.com/devraccoon/raccoon_notifier/tarball/master#egg=raccoon-notifier'],
...
)
- Module to easily send email using smtplib
- Unify email model
- Possible to send attachment
IMPORTANT: Email sender uses Gmail as default.
from raccoon_notifier.email_sender import EmailSender
sender = EmailSender('Software Name', '[email protected]', 'password')
sender.add_attachment(file_name) # Optional
sender.send(['[email protected]'], 'Example', 'Body')
EmailSender(name, email, password)
- name: Sender's name
- email: Sender's email
- password: Sender's password
EmailSender.add_attachment(attach)
- attach: File name and path
EmailSender.send(toaddrs, subject, body)
- toaddrs: list of recipients emails
- subject: email subject
- body: message to be sent
- Module to easily send SMS using Plivo API
- Unify SMS model
from raccoon_notifier.sms_sender import SMSSender
sender = SMSSender('Software Name', 'AuthID', 'AuthToken')
sender.send(['5516111111111'], "Hello, it's me")
SMSSender(name, auth_id, auth_token)
- name: Software name (appear before message)
- auth_id: Plivo AuthID
- auth_token: Plivo Auth Token
SMSSender.send(phones, message)
- phones: list of recipients phones
- message: message to be sent