diff options
Diffstat (limited to 'Chap16ProjTextMyself.py')
-rw-r--r-- | Chap16ProjTextMyself.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Chap16ProjTextMyself.py b/Chap16ProjTextMyself.py new file mode 100644 index 0000000..ac67ca9 --- /dev/null +++ b/Chap16ProjTextMyself.py @@ -0,0 +1,16 @@ +#! python3 + +# Chapter 16 Project Just Text Me Module +# Defines the textmyself() function that texts a message passed to it +# as a string. + +from twilio.rest import TwilioRestClient + +accountSID = 'ACxxxxxxxxxxxxxxxxxxxx' +authToken = 'xxxxxxxxxxxxxxxxxxxxxxx' +myNumber = '+15558675309' +twilioNumber = '+15558675309' + +def textmyself(message): + twilioCli = TwilioRestClient(accountSID, authToken) + twilioCli.messages.create(body=message, from_=twilioNumber, to=myNumber) |