Giter Site home page Giter Site logo

raccoon_notifier's Introduction

Notifier

USAGE

Include repository

virtualenv

Include at requirements.txt:

git+https://github.com/devraccoon/raccoon_notifier

setup.py

setup(
...
install_requires=[
...
  'raccoon-notifier',
...
],
...
dependency_links=['https://github.com/devraccoon/raccoon_notifier/tarball/master#egg=raccoon-notifier'],
...
)

Email Sender

  • Module to easily send email using smtplib
  • Unify email model
  • Possible to send attachment

IMPORTANT: Email sender uses Gmail as default.

Send email

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')

Arguments

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

SMS Sender

  • Module to easily send SMS using Plivo API
  • Unify SMS model

Send SMS

from raccoon_notifier.sms_sender import SMSSender

sender = SMSSender('Software Name', 'AuthID', 'AuthToken')
sender.send(['5516111111111'], "Hello, it's me")

Arguments

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

raccoon_notifier's People

Contributors

sabrinamagalhaes avatar arielmorelli avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.