Skip to main content

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


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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for masterpiece_pahomqtt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3fd87c9789052675c56f07bbe5859537277feedd9ef12155ba934303f98c69e0
MD5 07a1ef270151cf2a0807b72a2b477d1f
BLAKE2b-256 5528dfacac7c00b9d68888636f0a1bca9199d01ab284ab768bcef3e7a4ae455b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for masterpiece_pahomqtt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e9e64d899d1c2144a54af9d6312a814d70def71231929093f2e65f4f6961540
MD5 6e4ddaca684594e1ea755133469d0680
BLAKE2b-256 5b241dffc7d6ca00ebab8da3cdcf359fd4803cd62c27a4a0a4c367ed5703ce21

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