The TextMagic Python API includes classes and methods for accessing the functionality of the TextMagic REST API.
The easiest way to install the TextMagic Python API is via pip:
pip install textmagic
You can also install the package manually:
git clone git@github.com:textmagic/textmagic-rest-python.git cd textmagic-python python setup.py install
The first thing to do is create a TextmagicRestClient object:
from textmagic.rest import TextmagicRestClient
client = TextmagicRestClient("username", "API key")You will, of course, need to provide your own username and API key.
To send an SMS message:
client.messages.create(phones="comma-separated list of phone numbers", text="message text")You can send to multiple phone numbers by separating them by a comma.
Sphinx document is provided in the doc directory.
Building the documentation is as simple as runing make html, make latexpdf, etc.
If you are are using virtualenv, you may need to tweak the make file
to use sphinx-build from your virtualenv.
Alternatively, you could use sphinx-build directly.