Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
Drift MQTT tools
A collection of helpers to work with MQTT:
Client- wrapper aroundpaho.mqtt.Clientthat correctly handles subscriptions after reconnect
Usage
Producer
from drift_mqtt import Client
client = Client('tcp://127.0.0.1:8000', 'client_id')
client.connect()
client.loop_start()
...
client.publish('topic', 'some message')
Consumer
from drift_mqtt import Client
def message_handler(message):
print('Got message ', message.payload, message.topic)
client = Client('tcp://127.0.0.1:8000', client_id='test_subscriber')
client.subscribe('test_topic', message_handler)
client.connect()
client.loop_forever()
For more details please check examples/ folder
Metadata
Release files for drift-mqtt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drift_mqtt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / drift_mqtt-0.1.0-py3-none-any.whl
| Download URL | drift_mqtt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a1564b685954ca6c54b147a1585dc15f52cb5670210a2374d48aa74bde0e638
|
|
BLAKE2b-256 checksum How to use checksums |
e5f4b03a68365923afbda2534fa60116bea2a2ef3976736d8703a188f0210226
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|