{"categories":[{"label":"Internet","url":"https://skillfed.io/packages/category/internet/3"}],"enrichment":{"capability":"Provides an async/await interface to MQTT messaging, wrapping paho-mqtt with modern Python asyncio patterns instead of callbacks.","skillfed_tags":["mqtt-async","iot-messaging"],"use_cases":["Building async web services (FastAPI, Starlette) that need to publish or subscribe to MQTT topics without blocking request handlers.","Writing IoT device clients that listen for commands and publish sensor readings using native async/await instead of managing callbacks.","Integrating MQTT into async event-driven applications where you want message handling to fit naturally into the asyncio task model.","Sharing a single MQTT connection across multiple concurrent async functions without creating separate clients or managing complex callback state.","Filtering and routing incoming MQTT messages by topic pattern (e.g., humidity/outside, +/inside) within a single async loop."],"what_it_does":"asyncio-mqtt is a thin, modern wrapper around paho-mqtt that replaces callback-based MQTT code with async/await patterns. Instead of defining on_message, on_connect, and on_disconnect callbacks, you write straightforward async context managers and async for loops to subscribe, publish, and handle messages. It handles connection lifecycle automatically and raises MqttError exceptions instead of returning error codes, making error handling more Pythonic.\n\nThe package is designed for developers building asyncio-based applications\u2014web services, IoT clients, or any async Python code that needs MQTT messaging. It depends only on paho-mqtt for the underlying protocol implementation and typing-extensions for type hints, keeping the wrapper itself under 700 lines of code. It supports Python 3.7 through 3.11 and runs on Linux, macOS, and Windows (with a minor event-loop configuration on Windows).","worth_installing":"Yes. The package solves a real pain point\u2014callback-free MQTT in async Python\u2014with minimal dependencies, active maintenance, and no known vulnerabilities. Install friction is low and the BSD license is permissive. The only caveat is the Windows event-loop gotcha, which is well-documented and easily worked around. Suitable for production use in asyncio applications."},"id":"asyncio-mqtt","links":{"html":"https://skillfed.io/packages/asyncio-mqtt","md":"https://skillfed.io/packages/asyncio-mqtt.md","pypi":"https://pypi.org/project/asyncio-mqtt/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-06-26","license_spdx":null,"license_treatment":"permissive","name":"asyncio-mqtt","python_support":"supports_current","summary":"Idiomatic asyncio wrapper around paho-mqtt"},"popularity":{"monthly_downloads":634904,"position":5640,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.16.2"}
