发送短信的简单明了的方法
sms4的Python项目详细描述
SMS4 Python客户端
这是SMS4的python客户端库。
这个库提供了阻塞和非阻塞发送功能 通过SMS4 API发送文本消息。
安装
pip install sms4
用法
fromsms4importsend,nonblocking_send# result is a json server response. see docs for detailsresult=send('+123456798','The server is down!')print(result)# multiple numbers are supported and you can pass token via# 3rd argument to send functionresult=send(['+123456798','+123456799'],'The server is down!','YOUR_TOKEN')print(result)# Will be send in another thread, no result returnednonblocking_send('+123456798','The server is down!')