Skip to content

spookey/notify

Repository files navigation

notify

mail and sms alert in python

use this software as a platform to enable messaging and alerting to your software or scripts

this code is python3

configuration

to build yourself a configuration change the sample values in util.py and execute it afterwards:

python3 util.py

you should have a config.json afterwards.

twitter: generate an api key on dev.twitter.com or ask me for mine.

enter the keys in util.py then run python3 twitter.py to generate oauth credentials.

cli

this is a command line interface for your scripts

syntax: see python cli.py -h

Simple mail example:

python3 cli.py mail mail@example.com 'This is a test message' --subject 'Test'

Mail to multiple recipients:

python3 cli.py mail one@example.com two@example.com \
'There is an attached file' \
--cc three@example.com \
--subject 'Test' \
--sender 'Command Line <user@host.org>' \
--files README.markdown

Simple aspsms example:

python3 cli.py aspsms 0491234567890 'This is a test message' 

Simple twitter example:

python3 cli.py twitter 'This is a test message' --mention user1 user2

mail

this uses a smtp connection to a server configured.

syntax: see contents of sample.py

aspsms

this uses the http://aspsms.ch/ webservice.

requires python-requests module.

syntax: see contents of sample.py

twitter

posts http messages to twitter using oauth.

requires requests-oauthlib module.

syntax: see contents of sample.py

todo

  • More Channels

    • irc
    • gsmsms
  • Documentation

😺 😸 😺

About

mail, sms and twitter alert in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages