The most feature complete MQTT client for Python is Mosquitto . Below you see an sample app which both publish and subscribes to CloudMQTT.

The full code can be seen at

Alternative clients

Another good MQTT client for Python is paho-mqtt 1.0 . The Paho Python Client class provides some helper functions to make publishing one off messages to an MQTT server very straightforward. Futher documentation can be found here: .