Paho MQTT Broker Plugin for MasterPiece
Plugs in MQTT broker functionality to MasterPiece applications.
Note: This is an alpha release; do not use it for anything critical at this stage.
Usage
To install the module:
.. code-block:: bash
pip install masterpiece-pahomqtt
Once installed, you can create ~/.yourapp/config/PahoMqtt.json configuration file to specify
the server, port and other attributes Paho MQTT broker needs to run.
.. code-block:: text
{"host": "your host", "port": 1883, }
To import and instantiate PahoMqtt for use:
.. code-block:: python
from masterpiece_pahomqtt import PahoMqtt
mqtt = PahoMqtt()
An example to write and read data:
.. code-block:: python
mqtt.subscribe("your/topic")
mqtt.publish("your/topic", your_msg)
Note
The masterpiece_pahomqtt.PahoMqtt class is an implementation of the abstract masterpiece.mqtt.Mqtt
base class. By using the Mqtt interface your application remain implementation-independent.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for masterpiece-pahomqtt 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| masterpiece_pahomqtt-0.1.11.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| masterpiece_pahomqtt-0.1.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / masterpiece_pahomqtt-0.1.11.tar.gz
| Download URL | masterpiece_pahomqtt-0.1.11.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c80d3827b0dbb49ba8b2693a504420a622fea85ae5e9f88ff3eb17b0608e097a
|
|
BLAKE2b-256 checksum How to use checksums |
8aff7e23290fc1f80324195ab20e1195e9cb30124575f1d212c4f419c0ec236c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / masterpiece_pahomqtt-0.1.11-py3-none-any.whl
| Download URL | masterpiece_pahomqtt-0.1.11-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2328261597ab63a801145b5d6b777bfb8705ce4848ad675d46d9ecb8d96077b3
|
|
BLAKE2b-256 checksum How to use checksums |
2cb79e9f6870104fdd13c71f4e7ba27e819b1bc0d78b34526bfce14af5d9d941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|