initial commit

This commit is contained in:
Vivian Lim 2014-05-14 01:11:37 -04:00
commit 0f526a5543
2 changed files with 21 additions and 0 deletions

3
config.py Normal file
View File

@ -0,0 +1,3 @@
ACCOUNT_SID = "your-sid-here"
AUTH_TOKEN = "your-auth-token-here"
FROM_NUMBER = "your-number"

18
libsmscast.py Normal file
View File

@ -0,0 +1,18 @@
import config
from twilio.rest import TwilioRestClient
class LibSMSCast:
def __init__(self):
self.client = TwilioRestClient(config.ACCOUNT_SID, config.AUTH_TOKEN)
def send(to, msg):
for recipient in to:
self.client.messages.create(
to=recipient,
from_=config.FROM_NUMBER,
body=msg,
)