pyFreeSMS: A Python API
This is a Python API to send free messages via the many online free SMS providers. It currently works only with 160by2; I’ll add support for Way2SMS et all soon, though I’m hoping people interested in a specific provider will extend this API themselves.
How Will This Help Me?
This is primarily intended for developers looking to send messages from their Python applications. For instance, I’m currently developing an application that periodically checks my passport application status and messages it to me.
- Go here, click on the Downloads button at the top-right, and select the archive format that you’re comfortable with.
- Extracting the archive should now show you the
pyFreeSMSfolder and a
- Copy the
pyFreeSMSfolder to the directory where your code resides.
- Import the API:
- Send your message with the
sendmessage(username, password, targetPhoneNumber, message)function, replacing your account authentication details where necessary:
Considering the number of free SMS providers out there, I’m hoping there are a lot of you who might want to extend this API to your liking. To start off, you’ll first need to install Git:
Then you’ll need to get the code:
This will download the required source code to the current directory. To commit your extended code and added modules, it’d be best to read up the friendly documentation at Github itself.