Send an SMS Using Python
The Textmagic API Python wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you’ll then be able to send text messages.
Get it now on GitHubInstallation Instructions
Quick Installation
Run the following command to install the Textmagic Python helper using pip, a package management system used to install and manage software packages written in Python:
pip install textmagic
Manual Installation
You can also install the Textmagic Python helper from the GitHub repository using git. Run the following commands:
git clone [email protected]:textmagic/textmagic-rest-python.git cd textmagic-python python setup.py install
Requirements
The Python wrapper for the Textmagic API has the following requirements:
- Python 2.6 or higher
Sending an SMS using Python (an example)
Below is an example of how to send a text message using Python.
from textmagic.rest import TextmagicRestClient username = "your_textmagic_username" token = "your_apiv2_key" client = TextmagicRestClient(username, token) message = client.messages.create(phones="9990001001", text="Hello Textmagic")
Support
If you need help with the wrapper, or if you have any suggestions for improvements and/or if you have enquiries regarding the Python SMS API, please contact us by emailing [email protected].