Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Python bindings for the MQTT C client

Hello all,

I am planning to add Python bindings for the MQTT C client libraries. Dave Locke asked me how this would compare to a pure Python client. Adding the Python bindings is a small amount of work compared to writing the C client in the first place, so my feeling is why wouldn't you? Different approaches may well have different applications.

The bindings up to now have been written primarily to make testing of the C client easy, so they mirror the structure of the C API quite closely. To make them more "Pythonic", I would refactor them so that now we have:

import mqttv3

client = mqttv3.create(...)

mqttv3.connect(client, ...)

but then we would have:

import mqttv3

client = mqttv3.create(...)

client.connect(...)

Any thoughts welcome.

Ian


Back to the top