empicano/aiomqtt
소개
관용적인 asyncio MQTT 클라이언트
시스템 및 인프라What you can do
- No callbacks! 👍
- Complete MQTTv5 support (backpressure, user properties, ...)
- Automatic reconnection
- Fine-grained control over acknowledgments
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original[!NOTE] aiomqtt v3 is released! It switches the underlying protocol library from paho-mqtt to the sans-io mqtt5 library. This means aiomqtt is now pure asyncio (no more threads). Try it with
pip install aiomqtt==3.0.0-alpha.1.
aiomqtt
The idiomatic asyncio MQTT client. Write code like this:
Publish
async with aiomqtt.Client(hostname="test.mosquitto.org") as client:
await client.publish("ducks/louie/status", b"quack")
Subscribe
async with aiomqtt.Client(hostname="test.mosquitto.org") as client:
await client.subscribe(
aiomqtt.TopicFilter("ducks/#"), max_qos=aiomqtt.QoS.AT_MOST_ONCE,
)
async for message in client.messages():
print(message.payload)
Key features
- No callbacks! 👍
- Complete MQTTv5 support (backpressure, user properties, ...)
- Automatic reconnection
- Fine-grained control over acknowledgments
- Pure asyncio
- Fully type-hinted
Installation
pip install aiomqtt
The only dependency is mqtt5.
Documentation
To get started, see the guides.
If you're new to MQTT, we recommend reading HiveMQ's MQTT essentials as an introduction. Afterward, the MQTTv5 specification is a great reference.
The RealPython walkthrough is a nice introduction to Python's asyncio.
Contributing
We're happy about contributions! See CONTRIBUTING.md to get started.
Versioning
This project adheres to Semantic Versioning.
Changelog
See CHANGELOG.md, which follows the principles of Keep a Changelog.
관련 프로젝트 살펴보기
불러오는 중…