Paho MQTT broker plugin for `masterpiece` applications
Project description
Paho MQTT Broker Plugin for MasterPiece
This project adds MQTT broker functionality to MasterPiece applications.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file masterpiece_pahomqtt-0.1.0.tar.gz.
File metadata
- Download URL: masterpiece_pahomqtt-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ce5f78b1e7188bded028b2a2fd43118fc8635af23347d0903cd793991592a96
|
|
| MD5 |
b0b7f5dce087f2e069d2b74c0f8bef4a
|
|
| BLAKE2b-256 |
984fdbd5deff1268bdf92ad46a062f873597f289f583e8754895f42ae54d61ca
|
File details
Details for the file masterpiece_pahomqtt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: masterpiece_pahomqtt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b186e5821bf0d9ef4a70d6392ec2f5a532bbb221e257ecd9df94bb5379a97b5
|
|
| MD5 |
667bd8fedee47cbf7bb9146851079499
|
|
| BLAKE2b-256 |
8aa976dacc094285fb9d0c9fbe55f712cb65bce48a86d67bf9752b50182c515c
|