Registry / messaging / amqtt
library0.11.3pypypi✓ verified 84d ago

Python's asyncio-native MQTT broker and client. Version 0.11.3 supports MQTT 3.1.1 and 5.0. Released occasionally, with recent activity slowing.

pip install amqtt
INSTALL
IMPORT
SIG · AMQTT
A
amqtt
messagingpythonv0.11.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from amqtt.client import MQTTClient
from amqtt import Client
Direct import from amqtt package may fail; use amqtt.client submodule.

Connect to public MQTT broker and publish a message.

import asyncio import os from amqtt.client import MQTTClient async def main(): client = MQTTClient() await client.connect('mqtt://test.mosquitto.org:1883') await client.publish('test/topic', b'Hello') print("Published") await client.disconnect() asyncio.run(main())
Debug
Known issues
gotchaamqtt requires Python >= 3.10; older versions will fail to install.
fix
Upgrade Python to 3.10+.
affects: <3.10
deprecatedThe 'broker' module is experimental and may change; not recommended for production.
fix
Use a dedicated MQTT broker like Mosquitto for production.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'amqtt'
Library not installed or environment not activated.
fix
Run 'pip install amqtt' and ensure your Python environment has the package.
ImportError: cannot import name 'MQTTClient' from 'amqtt'
Incorrect import path (e.g., 'from amqtt import MQTTClient').
fix
Use 'from amqtt.client import MQTTClient'.
Upgrade
Version history
0.11.3latest on PyPI · released Aug 12, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
40
OpenAI (training)
1
Resources

No resource links recorded.

amqtt — pip install amqtt · libregistry