Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

An MQTT/UDP implementation in Python

Project description

MQTT/UDP Python (3.x) implementation

You can check other languages implementations also -


mqttudp - MQTT/UDP library in Python language

examples - Library usage examples - Shell script to start bidirectional MQTT/UDP to MQTT broker gateway mqttudpgate.service - Unix systemctl service definition for gateway

Examples - Send one message - Print all MQTT/UDP traffic - Print packets only if content is changeg - Translate all the data to OpenHAB REST API - Translate all the data from OpenHAB REST API (default sitemap) to MQTT/UDP - Send seqentially numbered packets as fast as possible - Check packets for sequentialness and calc speed - Translate data between MQTT/UDP and traditional MQTT - One way, to MQTT/UDP - One way, from MQTT/UDP - Generate traffic with random numbers - Send ping and print replies. Not all the implementations respond to ping yet.

Possible requirements

Some code examples may require paho-mqtt and websocket-client


Send data:

import mqttudp.engine

if __name__ == "__main__":
    mqttudp.engine.send_publish( "test_topic", "Hello, world!" )

Listen for data:

import mqttudp.engine

def recv_packet(ptype,topic,value,pflags,addr):
    if ptype != "publish":
        print( ptype + ", " + topic + "\t\t" + str(addr) )
    print( topic+"="+value+ "\t\t" + str(addr) )

if __name__ == "__main__":

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mqttudp-0.1.post1-py3-none-any.whl (11.5 kB) Copy SHA256 hash SHA256 Wheel py3
mqttudp-0.1.post1.tar.gz (15.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page