From 75a42ec54dbf721caa659ddf02c1f46fc2cb4bef Mon Sep 17 00:00:00 2001 From: mlot Date: Fri, 6 Jun 2025 13:40:57 -0400 Subject: initial commit for archiving --- Chap16ProjTextMyself.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Chap16ProjTextMyself.py (limited to 'Chap16ProjTextMyself.py') 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) -- cgit