gmqtt
Client for MQTT protocol
Decision gist · record as of 2026-08-14
Yes. gmqtt is a solid, actively maintained MQTT client with zero dependencies, permissive licensing, and broad protocol support. Install it if you need async MQTT connectivity in Python and are comfortable with callback-based event handling. The 630 days since last release is not a concern given the active repository and recent commits; the library is stable rather than abandoned.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.5 or later and an accessible MQTT broker at connection time.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained with recent commits and a stable release history since 2018.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute gmqtt freely in commercial and open-source projects with minimal restrictions.
last release 2024-11-22 (630 days) · last repo commit 2026-06-14 · 450 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 159,368 downloads/mo, #10,698 on PyPI
Alternatives
Verify before relying
pip install gmqtt
import asyncio
from gmqtt import Client as MQTTClient
async def main():
client = MQTTClient("client-id")
client.on_message = lambda c, t, p, q, pr: print(p)
await client.connect("mqtt.broker.host")
client.subscribe("topic/name")
await asyncio.sleep(10)
await client.disconnect()
asyncio.run(main())- Whether uvloop integration (mentioned in docs) provides measurable performance gains for typical workloads.
- Behavior and compatibility with brokers that do not support MQTT 5.0 downgrade negotiation.
- Performance characteristics under high message throughput or with many concurrent subscriptions.
What it is and what it does
gmqtt is a pure-Python async MQTT client library built on asyncio for connecting to MQTT brokers and exchanging messages. It implements both MQTT 5.0 (default) and 3.1.1 protocols, with automatic downgrade if a broker does not support version 5.0. The client handles subscriptions, message publishing with configurable QoS levels, authentication, and automatic reconnection with tunable retry behavior.
The library is callback-driven: you define handlers for connect, message receipt, disconnect, and subscribe events, then await the main connection loop. It supports MQTT 5.0 properties (session expiry, maximum packet size, user properties, content type, message expiry) and allows both synchronous and asynchronous message handlers. No external dependencies are required beyond Python's standard asyncio, making it lightweight and straightforward to integrate into async applications.
Use it for
- Build IoT device clients that publish sensor data and subscribe to control commands over MQTT.
- Create real-time message brokers or gateways that relay MQTT traffic between multiple topics or brokers.
- Implement monitoring dashboards that subscribe to device telemetry and display live updates.
- Develop async Python services that need to communicate via MQTT without blocking the event loop.
- Test MQTT broker behavior and message flow by scripting client interactions in Python.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
gmqtt is a solid, actively maintained MQTT client with zero dependencies, permissive licensing, and broad protocol support. Install it if you need async MQTT connectivity in Python and are comfortable with callback-based event handling. The 630 days since last release is not a concern given the active repository and recent commits; the library is stable rather than abandoned.
Install
gmqtt on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2018.
Requires Python 3.5 or later and an accessible MQTT broker at connection time.
License in practice
MIT license is permissive; you can use, modify, and distribute gmqtt freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install gmqtt
import asyncio
from gmqtt import Client as MQTTClient
async def main():
client = MQTTClient("client-id")
client.on_message = lambda c, t, p, q, pr: print(p)
await client.connect("mqtt.broker.host")
client.subscribe("topic/name")
await asyncio.sleep(10)
await client.disconnect()
asyncio.run(main())
Verify before relying
- Whether uvloop integration (mentioned in docs) provides measurable performance gains for typical workloads.
- Behavior and compatibility with brokers that do not support MQTT 5.0 downgrade negotiation.
- Performance characteristics under high message throughput or with many concurrent subscriptions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 630 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 159,368 / month, #10,698 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python Modules |
Evidence: gmqtt-0.7.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mqtt 5.0 protocol”
- gmqttgmqtt is an async Python MQTT client that connects to MQTT brokers,…
- tb-paho-mqtt-clientProvides an MQTT client library implementing protocol versions 5.0,…
- paho-mqttProvides an MQTT client library for connecting to MQTT brokers to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also paho-mqtt · aiomqtt · tb-paho-mqtt-client · asyncio-mqtt · tb-mqtt-client · pymysensors · amqp · aiormq · victron-mqtt · yoto-api