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.9.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.9-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for masterpiece_pahomqtt-0.1.9.tar.gz
Algorithm Hash digest
SHA256 b9d73663261b7fd97f5a1b60cc9277328e5ba9ad2c34d68c072380af9aef5873
MD5 8c0b44a4dd87618d2270493cd073be35
BLAKE2b-256 34755e8580a3eb89cf3b9798d3c1dc98599b7c91ae129c63494a2815c37d48f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for masterpiece_pahomqtt-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6282781825cfb2344058f7cad6abaeb6e405c1fcca2baafe5b7a94ae64d15d9d
MD5 3fbd6d2300242147d1dd7770f19b44c8
BLAKE2b-256 36c334ea09d3c7ebbe5069938a9202e4fde9845a5ae799ba95db960fe9b23f76

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