The Vonage SMS API is an HTTP-based API using either XML or JSON to describe how to send an SMS or understand a received SMS. Vonage provides a Python client library called nexmo-python that takes care of a lot of the underlying detail for you.

Before starting, make sure you have Python installed. The code here was tested on Python 2.7 and 3.6. If you’re running Python 2, make sure you also have virtualenv installed.

How to Send SMS Messages with Python, Flask and Nexmo

This tutorial introduces you to sending SMS with Python, making use of the Nexmo Python library. It starts by showing how to send SMS from the REPL, then goes on to show you how to build a simple flask app with SMS capabilities.