Skip to main content

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

Hi Ian,

This is the same approach I took originally with the mosquitto client
library. My experience is that it became more trouble to deal with the
bindings and packaging than it was to rewrite it as pure Python. I do
now have to make sure I fix bugs in both the C and Python clients at
the same time, but it's not that much bother. Overall it's made my
life easier on the development side and I'm sure it has made things
easier for other people to use it.

Anyway, this prompts me to submit a bug report for submission of the
mosquitto python client to Paho, if it's wanted (it saves you some
effort at least). It would need rebranding for Paho but that's no real
bother. I realise that I've been ignoring the future status of
mosquitto the broker for a while, but I can honestly say that I've had
some outstanding questions with Mike for a little while now.
Irrespective of that, I don't see that there is any doubt that client
implementations should be in Paho and this can move on quickly if
desired.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=403956

Cheers,

Roger


On Wed, Mar 20, 2013 at 3:59 PM, Ian Craggs
<icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 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
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top