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.5.tar.gz (5.6 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.5-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: masterpiece_pahomqtt-0.1.5.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for masterpiece_pahomqtt-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fbe94fd55a3113ef7ccf99212575379bba24e3b42c780a2a95918fe5ed36bdfc
MD5 f2fbd35f216beb2e7f13e0b2c7b97fc6
BLAKE2b-256 da658459558a7f7a17ee49c34fe9ff8484616f8e723b5aa9c11672b9baff8399

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for masterpiece_pahomqtt-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bb3b5c27095d8ebfb751e1439028c6ab6950c05da89e9a5893067bb1f0685f73
MD5 20eb503bf948d39332b9097228e0b35e
BLAKE2b-256 214fdfbca343f35ce2bfa06a69b7d7d7077045d775e52feb3450865a37790bf2

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