finds.dev← search

// the find

eclipse-paho/paho.mqtt.python

★ 2,407 · Python · NOASSERTION · updated Jun 2026

paho.mqtt.python

The official Eclipse Python client for MQTT, supporting protocol versions 3.1, 3.1.1, and 5.0. It's the de facto standard for Python MQTT work — if you're connecting a Python process to a broker (Mosquitto, HiveMQ, AWS IoT, etc.), this is what you reach for. Mature project under Eclipse Foundation governance.

Full MQTT 5.0 support including reason codes and properties, which most competing libraries still lack. External event loop integration is well-designed — the socket callbacks (on_socket_open, on_socket_register_write, etc.) let you drop it cleanly into asyncio or trio without fighting the threading model. The v2.0 callback API cleaned up a real wart: VERSION2 callbacks are consistent between MQTTv3 and v5, so you're not writing protocol-conditional branches everywhere. Test suite actually uses a real broker subprocess rather than mocks, which means the protocol behavior is actually verified.

Session persistence is explicitly broken and documented as such — clean_session=False stores state in memory only, so a process restart loses QoS guarantees entirely. This isn't a minor caveat; it makes the library unsuitable for any use case that genuinely requires QoS 2 exactly-once delivery across restarts. The threading model is a mess to reason about: loop_start() runs a background thread, on_publish() races with publish() mid tracking, and the README documents the race condition without fixing it. The callback-based API is showing its age — there's no native async/await interface, so asyncio integration requires the external loop dance which is more ceremony than it should be in 2026. VERSION1 callbacks are still present as deprecated dead weight, creating confusion about which signature to use.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →