向移动设备发送短信通知的包
notifySms的Python项目详细描述
此程序有助于向指定手机发送短信通知。
先决条件: -Twilio帐户,它的帐户,令牌和moblile号码。 或者 -way2sms帐户,其apikey&secret代码。
用法:
1. To use way2sms for sending sms set below environement variable. way2sms=True apikey=<API KEY of way2sms account> secret=<Secret of way2sms account> Windows syntax : set <Environment Variable name>=<Value> Linux syntax : export <Environment variable name>=<Value> OR To use Twilio account specfiy twilio detials config.json in file encoded using base64.b64encode() 2. Using Program to send sms. python sendSms.py [Message needs to be sent] 3. Using module in other script to nofiy via sms. from nofiySms import sendSms sendSms.send_sms("Message body",[To Number])