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

Uploaded Python 3

File details

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

File metadata

  • Download URL: masterpiece_pahomqtt-0.1.3.tar.gz
  • Upload date:
  • Size: 5.5 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.3.tar.gz
Algorithm Hash digest
SHA256 197c164c28bf51632d2496d66199585956e485a0cd37dadde8899825de81c965
MD5 7bf48bfcfbf0dd3b95d3b5c5527d5f2e
BLAKE2b-256 6af5e7d7e6c0e88166c5491bedcc2255c5774075a29efbc27978c4ffa4d831d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for masterpiece_pahomqtt-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fff6e0654dd0450fd6341c305128d58d9dbf7a01b493888ed8d134f89425287
MD5 1f089094ed451ed574f6e44fbc7fb154
BLAKE2b-256 365ab9326136590c0567d6e3bd172aa492c3fb4e50fdc2e0ccd05bb32317691a

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