Skip to main content

Paho MQTT broker plugin for `masterpiece` applications

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

masterpiece_pahomqtt-0.1.11.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

masterpiece_pahomqtt-0.1.11-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file masterpiece_pahomqtt-0.1.11.tar.gz.

File metadata

  • Download URL: masterpiece_pahomqtt-0.1.11.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for masterpiece_pahomqtt-0.1.11.tar.gz
Algorithm Hash digest
SHA256 c80d3827b0dbb49ba8b2693a504420a622fea85ae5e9f88ff3eb17b0608e097a
MD5 412e29993e4b34dbbe3a97d88d3d62d5
BLAKE2b-256 8aff7e23290fc1f80324195ab20e1195e9cb30124575f1d212c4f419c0ec236c

See more details on using hashes here.

File details

Details for the file masterpiece_pahomqtt-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for masterpiece_pahomqtt-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2328261597ab63a801145b5d6b777bfb8705ce4848ad675d46d9ecb8d96077b3
MD5 4c6cd4aa39bafa8615ab3f472d4130af
BLAKE2b-256 2cb79e9f6870104fdd13c71f4e7ba27e819b1bc0d78b34526bfce14af5d9d941

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page