{"id":14963525,"url":"https://github.com/empicano/aiomqtt","last_synced_at":"2026-01-04T18:16:58.591Z","repository":{"id":38400363,"uuid":"253497870","full_name":"empicano/aiomqtt","owner":"empicano","description":"The idiomatic asyncio MQTT client","archived":false,"fork":false,"pushed_at":"2025-05-03T20:21:01.000Z","size":458,"stargazers_count":473,"open_issues_count":17,"forks_count":81,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-13T12:06:33.456Z","etag":null,"topics":["async","asyncio","internet-of-things","iot","mqtt","mqttv5","paho-mqtt","pubsub","python"],"latest_commit_sha":null,"homepage":"https://aiomqtt.bo3hm.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/empicano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-06T12:56:54.000Z","updated_at":"2025-05-12T14:02:26.000Z","dependencies_parsed_at":"2023-12-17T20:35:24.100Z","dependency_job_id":"46854b97-af30-414d-a49f-5607e5a88195","html_url":"https://github.com/empicano/aiomqtt","commit_stats":{"total_commits":395,"total_committers":51,"mean_commits":7.745098039215686,"dds":0.6784810126582279,"last_synced_commit":"84158292e758ab056dc95ef86a5b718cb2945bc1"},"previous_names":["sbtinstruments/aiomqtt","sbtinstruments/asyncio-mqtt","empicano/aiomqtt"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empicano%2Faiomqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empicano%2Faiomqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empicano%2Faiomqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empicano%2Faiomqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/empicano","download_url":"https://codeload.github.com/empicano/aiomqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254068635,"owners_count":22009408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asyncio","internet-of-things","iot","mqtt","mqttv5","paho-mqtt","pubsub","python"],"created_at":"2024-09-24T13:31:44.572Z","updated_at":"2026-01-04T18:16:58.584Z","avatar_url":"https://github.com/empicano.png","language":"Python","funding_links":[],"categories":["Clients"],"sub_categories":["Python"],"readme":"# The idiomatic asyncio MQTT client 🙌\n\n\u003ca href=\"https://pypi.org/project/aiomqtt\"\u003e\u003cimg alt=\"PyPI downloads\" src=\"https://img.shields.io/pypi/dm/aiomqtt\"\u003e\u003c/a\u003e \u003ca href=\"https://pypi.org/project/aiomqtt\"\u003e\u003cimg alt=\"PyPI version\" src=\"https://img.shields.io/pypi/v/aiomqtt\"\u003e\u003c/a\u003e \u003ca href=\"https://pypi.org/project/aiomqtt\"\u003e\u003cimg alt=\"Supported Python versions\" src=\"https://img.shields.io/pypi/pyversions/aiomqtt.svg\"\u003e\u003c/a\u003e\n\n**Documentation:** [https://aiomqtt.bo3hm.com](https://aiomqtt.bo3hm.com)\n\n---\n\n\u003c!-- documentation start --\u003e\n\nWrite code like this:\n\n**Publish**\n\n```python\nasync with Client(\"test.mosquitto.org\") as client:\n    await client.publish(\"temperature/outside\", payload=28.4)\n```\n\n**Subscribe**\n\n```python\nasync with Client(\"test.mosquitto.org\") as client:\n    await client.subscribe(\"temperature/#\")\n    async for message in client.messages:\n        print(message.payload)\n```\n\n## Key features\n\n- No more callbacks! 👍\n- No more return codes (welcome to the `MqttError`)\n- Graceful disconnection (forget about `on_unsubscribe`, `on_disconnect`, etc.)\n- Supports MQTT versions 5.0, 3.1.1 and 3.1\n- Fully type-hinted\n- Did we mention no more callbacks?\n\n## Installation\n\n```\npip install aiomqtt\n```\n\nThe only dependency is [paho-mqtt](https://github.com/eclipse/paho.mqtt.python).\n\nIf you can't wait for the latest version, install directly from GitHub with:\n\n```\npip install git+https://github.com/empicano/aiomqtt\n```\n\n### Note for Windows users\n\nSince Python 3.8, the default asyncio event loop is the `ProactorEventLoop`. Said loop [doesn't support the `add_reader` method](https://docs.python.org/3/library/asyncio-platforms.html#windows) that is required by aiomqtt. Please switch to an event loop that supports the `add_reader` method such as the built-in `SelectorEventLoop`:\n\n```python\n# Change to the \"Selector\" event loop if platform is Windows\nif sys.platform.lower() == \"win32\" or os.name.lower() == \"nt\":\n    from asyncio import set_event_loop_policy, WindowsSelectorEventLoopPolicy\n    set_event_loop_policy(WindowsSelectorEventLoopPolicy())\n# Run your async application as usual\nasyncio.run(main())\n```\n\n## License\n\nThis project is licensed under the [BSD 3-clause License](https://opensource.org/licenses/BSD-3-Clause).\n\nNote that the underlying paho-mqtt library is dual-licensed. One of the licenses is the [Eclipse Distribution License v1.0](https://www.eclipse.org/org/documents/edl-v10.php), which is almost identical to the BSD 3-clause License. The only differences are:\n\n- One use of \"COPYRIGHT OWNER\" (EDL) instead of \"COPYRIGHT HOLDER\" (BSD)\n- One use of \"Eclipse Foundation, Inc.\" (EDL) instead of \"copyright holder\" (BSD)\n\n## Contributing\n\nWe're happy about contributions to aiomqtt! 🎉 Get started by reading [CONTRIBUTING.md](https://github.com/empicano/aiomqtt/blob/main/CONTRIBUTING.md).\n\n## Versioning\n\nThis project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Breaking changes will only occur in major `X.0.0` releases.\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/empicano/aiomqtt/blob/main/CHANGELOG.md), which follows the principles of [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fempicano%2Faiomqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fempicano%2Faiomqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fempicano%2Faiomqtt/lists"}