--- id: tb-paho-mqtt-client version: "2.1.2" license: EPL-2.0 OR BSD-3-Clause license_treatment: copyleft maintenance: aging --- # tb-paho-mqtt-client — MQTT version 5.0/3.1.1 client class License: copyleft · Maintenance: aging · Downloads: 118.4K/mo ## What it is and what it does This is the Eclipse Paho MQTT Python client, a library for connecting applications to MQTT brokers to send and receive messages over a lightweight publish-subscribe protocol. It supports MQTT versions 5.0, 3.1.1, and 3.1, making it suitable for IoT and machine-to-machine communication where bandwidth and code footprint matter. The library provides a full Client class for fine-grained control, plus helper functions for simple one-off publish or subscribe operations. The client offers multiple network loop modes: a threaded loop (loop_start/loop_stop) for non-blocking operation, a blocking loop (loop_forever) that handles reconnection automatically, and a manual loop for custom event integration. Callbacks allow your application to react to connection, message receipt, and publish acknowledgment events. Known limitations include in-memory-only session storage (sessions are lost on restart) and potential message loss for unacknowledged QoS 1 and QoS 2 messages. Use it for: - Build IoT applications that publish sensor readings or receive commands from a central broker. - Implement lightweight remote monitoring where network bandwidth is constrained. - Create publish-subscribe messaging systems for real-time data distribution across devices. - Integrate MQTT communication into Python applications with automatic reconnection handling. - Subscribe to multiple topics and process incoming messages via callbacks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides an MQTT client library implementing protocol versions 5.0, 3.1.1, and 3.1 for publishing and subscribing to message topics on an MQTT broker. Yes, with conditions. The package is stable and well-maintained by Eclipse Foundation, with no known vulnerabilities and low install friction. However, the 494-day gap since last release warrants checking whether your use case can tolerate the known limitations: in-memory session storage (no persistence across restarts) and potential QoS 2 message duplication under certain reconnection scenarios. If those constraints are acceptable, it is a solid choice for MQTT connectivity. ## Install pip install tb-paho-mqtt-client uv add tb-paho-mqtt-client poetry add tb-paho-mqtt-client ## Installing tb-paho-mqtt-client Before you install: Low install friction with no runtime dependencies. Maintenance status is aging (494 days since last release), though the package remains supported for current Python versions (3.7+). License in practice: Dual-licensed under EPL-2.0 or BSD-3-Clause with copyleft treatment. Users may choose either license; EPL-2.0 requires source disclosure for modifications, while BSD-3-Clause is more permissive. Quickstart: pip install tb-paho-mqtt-client import paho.mqtt.client as mqtt mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2) mqttc.connect("mqtt.eclipseprojects.io", 1883, 60) mqttc.subscribe("topic/name") mqttc.loop_forever() Requires Python 3.7 or later. Release 2.0+ contains breaking API changes; migration guide available in release notes. Verify before relying: - Whether the 494-day gap since last release reflects stable maturity or abandonment risk - Current state of the known session persistence limitation (in-memory only, not persisted across restarts) - Whether QoS 2 double-delivery behavior under clean_session=True is acceptable for your use case ## Package facts - License: EPL-2.0 OR BSD-3-Clause (copyleft) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 118.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mqtt client library, publish subscribe messaging, iot connectivity protocol, mqtt broker connection, lightweight message transport, machine to machine communication, mqtt python client, mqtt, iot, messaging [View on SkillFed](https://skillfed.io/packages/tb-paho-mqtt-client) · [View on PyPI](https://pypi.org/project/tb-paho-mqtt-client/)