--- id: paho-mqtt version: "2.1.0" license: EPL-2.0 OR BSD-3-Clause license_treatment: copyleft maintenance: dormant --- # paho-mqtt — MQTT version 5.0/3.1.1 client class License: copyleft · Maintenance: dormant · Downloads: 8.5M/mo ## What it is and what it does paho-mqtt is the Eclipse Paho MQTT Python client library, a reference implementation for connecting applications to MQTT brokers. It provides a Client class and helper functions to publish messages, subscribe to topics, and receive published messages over the MQTT protocol. The library supports MQTT versions 5.0, 3.1.1, and 3.1, making it compatible with a wide range of brokers and IoT platforms. The package is designed for lightweight, bandwidth-constrained environments typical of machine-to-machine (M2M) and Internet of Things (IoT) applications. It offers multiple network loop modes—threaded (loop_start/loop_stop), blocking (loop_forever), and manual (loop)—to fit different application architectures. Callbacks handle connection, message receipt, and publish acknowledgment events. However, the library has known limitations: session state is stored in memory only, not persisted, which can result in message loss on client restart; QoS 2 message delivery guarantees are not fully compliant with the MQTT standard. Use it for: - Build IoT sensor applications that publish temperature, humidity, or other metrics to a central MQTT broker for aggregation. - Create home automation systems where devices subscribe to control topics and publish status updates. - Implement remote monitoring dashboards that subscribe to device topics and display real-time data. - Develop lightweight edge applications on resource-constrained devices using the minimal code footprint MQTT provides. - Connect legacy systems to modern IoT platforms via MQTT publish/subscribe messaging. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides an MQTT client library for connecting to MQTT brokers to publish and subscribe to messages, supporting MQTT protocol versions 5.0, 3.1.1, and 3.1. Yes, with conditions. paho-mqtt is a stable, well-established MQTT client with no known vulnerabilities and low installation friction. However, maintenance is dormant (837 days since last release), so expect no active support or bug fixes. Install it if you need a reliable, mature MQTT client for production IoT or M2M applications and can tolerate the lack of ongoing development. Avoid it if you require active maintenance, recent security patches, or help with migration from version 1.x to 2.x. ## Install pip install paho-mqtt uv add paho-mqtt poetry add paho-mqtt ## Installing paho-mqtt Before you install: Low installation friction with no runtime dependencies. Maintenance status is dormant—last release was 837 days ago—so expect no active bug fixes or feature development, though the library remains functional for existing use. License in practice: Dual-licensed under EPL-2.0 or BSD-3-Clause (copyleft treatment). Users may choose the more permissive BSD-3-Clause for proprietary projects, but EPL-2.0 requires source disclosure if modifications are distributed. Quickstart: pip install paho-mqtt import paho.mqtt.client as mqtt mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2) mqttc.connect("mqtt.eclipseprojects.io", 1883, 60) mqttc.loop_forever() Requires Python 3.7 or later. Breaking changes introduced in version 2.0; existing code may need migration. Verify before relying: - Whether dormant status reflects stable maturity or abandoned maintenance—no recent commits or activity data provided. - Extent of real-world production use and community support despite 837 days since last release. - Whether session persistence limitations (in-memory only when clean_session=False) are acceptable for your use case. ## Package facts - License: EPL-2.0 OR BSD-3-Clause (copyleft) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 8.5M/month (top 5,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 messaging, mqtt python client, mqtt, iot, messaging [View on SkillFed](https://skillfed.io/packages/paho-mqtt) · [View on PyPI](https://pypi.org/project/paho-mqtt/)