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
Installation
pip install drift-mqtt
Or get the latest version from GitHub:
pip install git+https://github.com/panda-official/DriftMqtt.git
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.2.2
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 | Actions Reset |
|---|---|---|---|---|
| drift_mqtt-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for drift_mqtt-0.2.2-py3-none-any.whl |
Release files / drift_mqtt-0.2.2-py3-none-any.whl
| Download URL | drift_mqtt-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d021b98b0bcefc20275c3c58b4450b76efff6f66e8f835511dc84bde4114c82
|
|
BLAKE2b-256 checksum How to use checksums |
77250f8162eaa0ed80bde1168c8612dc7cd959e40f487793d263ab60482f964e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for drift-mqtt 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.