mqtt-client


Namemqtt-client JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://mqtt.clubpulp.com/
SummarySimple MQTT Client.
upload_time2023-07-12 17:33:39
maintainer
docs_urlNone
authorSamuel de Ancos
requires_python>=3.6
license
keywords mqtt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MQTT Client 

ver: 1.6.1

[Documentation](https://mqtt.clubpulp.com/)

[![Downloads](https://pepy.tech/badge/mqtt-client)](https://pepy.tech/project/mqtt-client) [![Downloads](https://pepy.tech/badge/mqtt-client/month)](https://pepy.tech/project/mqtt-client) [![Downloads](https://pepy.tech/badge/mqtt-client/week)](https://pepy.tech/project/mqtt-client)

## Install

> pip install --upgrade mqtt-client

## Examples

```shell
mqtt-client publish --config=my_config_file.json
mqtt-client subscribe --config=my_config_file.json
```

```shell
mqtt-client publish --host=mqttbroker.testing:1883 --topic=home/room/1/up --payload=ok
mqtt-client publish --host=mqttbroker.testing:1883 --topic=home/room/1/up --interactive
mqtt-client subscribe --host=mqttbroker.testing:1883 --topic=home/room/1/up
```

```shell
mqtt-client subscribe --host=mqttbroker.testing:1883 --topic=home/room/1/up --callback=command --command=my_command
```

## Usage

Simple MQTT Client.

```shell
Usage:
  mqtt-client (publish | subscribe) --config=<config>
  mqtt-client publish --host=<host> --topic=<topic> (--payload=<payload> | --interactive) [--client_id=<client_id>] [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--qos=<qos>] [--retain=<retain>]
  mqtt-client subscribe --host=<host> --topic=<topic> [--client_id=<client_id>] [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--callback=<callback>] [--command=<command>]
  mqtt-client (-h|--help)
  mqtt-client (-v|--version)

Commands:
  publish                   Publish to topic from MQTT Broker.
  subscribe                 Subscribe to topic from MQTT Broker.

Options:
  -h --help                 Show this screen.
  -v --version              Show version.
  --config=<config>         Config file.
  --host=<host>             Broker Host. (Example: example.your_broker.com:1883)
  --topic=<topic>           Topic.
  --payload=<payload>       Payload to send.
  -i --interactive          Interactive mode.
  --client_id=<client_id>   Client ID.
  --username=<username>     Username.
  --password=<password>     Password.
  --transport=<transport>   TCP, TCP-TLS, WS, WS-TLS (Default: TCP)
  --cert_path=<cert_path>   Path cert (Default: ./mqtt_broker_cert.pem)
  --qos=<qos>               Qos (Default: 0)
  --retain=<retain>         Retain (Default: false)
  --callback=<callback>     Use a custom callback for subscriber. (default, raw, command)
  --command=<command>       Command for callback type command.

```

## Example file config

> mqtt-client publish --config=example_config.json

```json
{
  "host": "mqttbroker:1883",
  "topic": "my_topic",
  "payload": "Testing Simple MQTT Client 1.5.0",
  "interactive": false,
  "client_id": "awesome-mqtt-client",
  "username": "user",
  "password": "pass",
  "transport": "TCP",
  "cert_path": "",
  "qos": 0,
  "retain": false,
  "callback": "",
  "command": ""
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://mqtt.clubpulp.com/",
    "name": "mqtt-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "mqtt",
    "author": "Samuel de Ancos",
    "author_email": "sdeancos@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e3/50/f010f4df624caac6d9c4be85485773c7a27188ba475c4a77b2425f91a2c4/mqtt-client-1.6.1.tar.gz",
    "platform": null,
    "description": "# MQTT Client \n\nver: 1.6.1\n\n[Documentation](https://mqtt.clubpulp.com/)\n\n[![Downloads](https://pepy.tech/badge/mqtt-client)](https://pepy.tech/project/mqtt-client) [![Downloads](https://pepy.tech/badge/mqtt-client/month)](https://pepy.tech/project/mqtt-client) [![Downloads](https://pepy.tech/badge/mqtt-client/week)](https://pepy.tech/project/mqtt-client)\n\n## Install\n\n> pip install --upgrade mqtt-client\n\n## Examples\n\n```shell\nmqtt-client publish --config=my_config_file.json\nmqtt-client subscribe --config=my_config_file.json\n```\n\n```shell\nmqtt-client publish --host=mqttbroker.testing:1883 --topic=home/room/1/up --payload=ok\nmqtt-client publish --host=mqttbroker.testing:1883 --topic=home/room/1/up --interactive\nmqtt-client subscribe --host=mqttbroker.testing:1883 --topic=home/room/1/up\n```\n\n```shell\nmqtt-client subscribe --host=mqttbroker.testing:1883 --topic=home/room/1/up --callback=command --command=my_command\n```\n\n## Usage\n\nSimple MQTT Client.\n\n```shell\nUsage:\n  mqtt-client (publish | subscribe) --config=<config>\n  mqtt-client publish --host=<host> --topic=<topic> (--payload=<payload> | --interactive) [--client_id=<client_id>] [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--qos=<qos>] [--retain=<retain>]\n  mqtt-client subscribe --host=<host> --topic=<topic> [--client_id=<client_id>] [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--callback=<callback>] [--command=<command>]\n  mqtt-client (-h|--help)\n  mqtt-client (-v|--version)\n\nCommands:\n  publish                   Publish to topic from MQTT Broker.\n  subscribe                 Subscribe to topic from MQTT Broker.\n\nOptions:\n  -h --help                 Show this screen.\n  -v --version              Show version.\n  --config=<config>         Config file.\n  --host=<host>             Broker Host. (Example: example.your_broker.com:1883)\n  --topic=<topic>           Topic.\n  --payload=<payload>       Payload to send.\n  -i --interactive          Interactive mode.\n  --client_id=<client_id>   Client ID.\n  --username=<username>     Username.\n  --password=<password>     Password.\n  --transport=<transport>   TCP, TCP-TLS, WS, WS-TLS (Default: TCP)\n  --cert_path=<cert_path>   Path cert (Default: ./mqtt_broker_cert.pem)\n  --qos=<qos>               Qos (Default: 0)\n  --retain=<retain>         Retain (Default: false)\n  --callback=<callback>     Use a custom callback for subscriber. (default, raw, command)\n  --command=<command>       Command for callback type command.\n\n```\n\n## Example file config\n\n> mqtt-client publish --config=example_config.json\n\n```json\n{\n  \"host\": \"mqttbroker:1883\",\n  \"topic\": \"my_topic\",\n  \"payload\": \"Testing Simple MQTT Client 1.5.0\",\n  \"interactive\": false,\n  \"client_id\": \"awesome-mqtt-client\",\n  \"username\": \"user\",\n  \"password\": \"pass\",\n  \"transport\": \"TCP\",\n  \"cert_path\": \"\",\n  \"qos\": 0,\n  \"retain\": false,\n  \"callback\": \"\",\n  \"command\": \"\"\n}\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simple MQTT Client.",
    "version": "1.6.1",
    "project_urls": {
        "Homepage": "https://mqtt.clubpulp.com/"
    },
    "split_keywords": [
        "mqtt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e350f010f4df624caac6d9c4be85485773c7a27188ba475c4a77b2425f91a2c4",
                "md5": "49c02591a1326d364311e4c52a62e472",
                "sha256": "5b9f6c0df82e9ab8f2f62d6501abaf862c0ff75eebcabd12399492b2a383e04a"
            },
            "downloads": -1,
            "filename": "mqtt-client-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "49c02591a1326d364311e4c52a62e472",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5155,
            "upload_time": "2023-07-12T17:33:39",
            "upload_time_iso_8601": "2023-07-12T17:33:39.483657Z",
            "url": "https://files.pythonhosted.org/packages/e3/50/f010f4df624caac6d9c4be85485773c7a27188ba475c4a77b2425f91a2c4/mqtt-client-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 17:33:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mqtt-client"
}
        
Elapsed time: 0.08651s