https://github.com/richrd/sl-web-sms
Python lib for sending free SMS messages via oma.saunalahti.fi web interface.
https://github.com/richrd/sl-web-sms
Last synced: 7 months ago
JSON representation
Python lib for sending free SMS messages via oma.saunalahti.fi web interface.
- Host: GitHub
- URL: https://github.com/richrd/sl-web-sms
- Owner: richrd
- License: mit
- Created: 2013-10-16T15:06:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-25T19:00:27.000Z (over 12 years ago)
- Last Synced: 2024-12-28T18:39:24.586Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sl-web-sms
==========
Simple Python lib for sending free SMS-messages via oma.saunalahti.fi web interface.
### Usage ###
import sl_web_sms
# Methods 'Login' and 'Send' return True on success, otherwise False.
# At the moment, no error handling is implemented, so use try & except.
service = sl_web_sms.SaunalahtiWebSMS()
try:
service.Login(user,pw)
message = u"Hello world!" # message data must be unicode
# Automatically select which number to send from
service.Send(to,message)
# or
# Select the first available number to send from
service.Send(to,message,from=service.sender_numbers[0])
print "Message sent."
except Exception,e:
print "Sorry, something broke:",e