Skip to main content

Thin layer built on top of paho-mqtt allowing for connections with unix socket brokers.

Project description

paho-socket

This package features a thin layer built on top of paho-mqtt allowing for connections with unix socket brokers. The package was built with my other projects in mind, and at the moment it only has features I've found useful so far. To be more precise, it allows:

  • Connecting to unix socket based brokers supporting plaintext MQTT protocol.

Following features are not supported:

  • TLS over unix socket,
  • MQTT over websocket over unix socket.

All the base features of paho-mqtt are still available using the package provided class.

The package is based on paho-mqtt 1.5.1, and since it utilizes non public methods and attributes of the original client it may not work with other versions.

Installation

Package can be installed from PyPI:

pip install paho-socket

Connection establishing

The package provides a class that inherits from the paho-mqtt Client. It's interface is extended with sock_connect and sock_connect_async methods, which should be used in the similar manner as those intended for creation of TCP/IP based connections. Once the connection is established, all the paho-mqtt feature work as in the original package, including reconnects.

Tests

To perform test activities, it is necessary to install dependencies contained in requirements-dev.txt.

python setup.py develop
pip install -e '.[dev]'

To run automatic tests, run the following command

pytest --cov=paho_socket

License

This code is released under the EPL.

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

paho-socket-0.0.3.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file paho-socket-0.0.3.tar.gz.

File metadata

  • Download URL: paho-socket-0.0.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.1

File hashes

Hashes for paho-socket-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a9af0a961fd90e82a370ae15076580df1e0da0e464d8c2d03c59b1f7817c3d50
MD5 2a2e8eda9ebb87f7f2f56c6d3fbf2787
BLAKE2b-256 72c41571b946c9cd33cd4f098551a6a5d313ca9ec3225f799d1916c292c21b0f

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