Created
March 28, 2017 19:53
-
-
Save woutervdijke/33e5675f50f65ae0d490009c96e8ba0d to your computer and use it in GitHub Desktop.
Python module to text myself
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
# textMe.py - Defines the wouter() function that texts me a message | |
# passed to it as a string. | |
# based on 'Automate the boring stuff with Python' by Al Sweigart | |
# when installed in the site-packages folder where Python is installed, it | |
# can be called using "import textme" | |
# Preset values: | |
accountSID = 'TWILIOSID' | |
authToken = 'TWILIOTOKEN' | |
wouterNumber = 'MyOwnNumber' | |
twilioNumber = 'MyTwilioNumber' | |
from twilio.rest import TwilioRestClient | |
def wouter(message): | |
twilioCli = TwilioRestClient(accountSID, authToken) | |
twilioCli.messages.create(body=message, from_=twilioNumber, to=wouterNumber) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment