summaryrefslogtreecommitdiff
path: root/Chap16ProjTextMyself.py
diff options
context:
space:
mode:
authormlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
committermlot <petri-rush-curvy@duck.com>2025-06-06 13:40:57 -0400
commit75a42ec54dbf721caa659ddf02c1f46fc2cb4bef (patch)
tree84be794a2481e356a7784557a6f9fb6fbf29cfdd /Chap16ProjTextMyself.py
initial commit for archivingHEADmain
Diffstat (limited to 'Chap16ProjTextMyself.py')
-rw-r--r--Chap16ProjTextMyself.py16
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)