iqrfpy-mqtt-transport


Nameiqrfpy-mqtt-transport JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport
SummaryMQTT transport extension for iqrfpy
upload_time2024-04-02 15:33:26
maintainerNone
docs_urlNone
authorKarel Hanák
requires_python>=3.10
licenseApache-2.0
keywords iqrf mqtt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## iqrf-mqtt-transport

An extension for [iqrfpy](https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrfpy/) for MQTT communication with IQRF Gateway daemon.

## Quick start

Before installing the library, it is recommended to first create a virtual environment.
Virtual environments help isolate python installations as well as pip packages independent of the operating system.

A virtual environment can be created and launched using the following commands:

```bash
python3 -m venv <dir>
source <dir>/bin/activate
```

iqrfpy can be installed using the pip utility:

```bash
python3 -m pip install -U iqrfpy-mqtt-transport
```

Example use:
```python
from iqrfpy.ext.mqtt_sync_transport import MqttTransport, MqttTransportParams
from iqrfpy.peripherals.coordinator.requests.bonded_devices import BondedDevicesRequest
from iqrfpy.peripherals.coordinator.responses.bonded_devices import BondedDevicesResponse

params = MqttTransportParams(
    host=..., # MQTT broker host
    port=..., # MQTT broker port
    client_id=..., # MQTT client ID
    request_topic=..., # Request topic that Daemon subscribes to
    response_topic=..., # Response topic that Daemon publishes responses to
    qos=1,
    keepalive=25
)
transport = MqttTransport(params=params, auto_init=True)

request = BondedDevicesRequest()
response: BondedDevicesResponse = transport.send_and_receive(request=request, timeout=10)

print(response.bonded)
```

## Documentation

For more information, check out our [API reference](https://apidocs.iqrf.org/iqrfpy/latest/iqrfpy.html).

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport",
    "name": "iqrfpy-mqtt-transport",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "iqrf, mqtt",
    "author": "Karel Han\u00e1k",
    "author_email": "karel.hanak@iqrf.org",
    "download_url": "https://files.pythonhosted.org/packages/ca/14/5ff80166de3b9be795af89d728afc97ad4c1fbf9b08af362587659231483/iqrfpy-mqtt-transport-0.1.0.tar.gz",
    "platform": null,
    "description": "## iqrf-mqtt-transport\n\nAn extension for [iqrfpy](https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrfpy/) for MQTT communication with IQRF Gateway daemon.\n\n## Quick start\n\nBefore installing the library, it is recommended to first create a virtual environment.\nVirtual environments help isolate python installations as well as pip packages independent of the operating system.\n\nA virtual environment can be created and launched using the following commands:\n\n```bash\npython3 -m venv <dir>\nsource <dir>/bin/activate\n```\n\niqrfpy can be installed using the pip utility:\n\n```bash\npython3 -m pip install -U iqrfpy-mqtt-transport\n```\n\nExample use:\n```python\nfrom iqrfpy.ext.mqtt_sync_transport import MqttTransport, MqttTransportParams\nfrom iqrfpy.peripherals.coordinator.requests.bonded_devices import BondedDevicesRequest\nfrom iqrfpy.peripherals.coordinator.responses.bonded_devices import BondedDevicesResponse\n\nparams = MqttTransportParams(\n    host=..., # MQTT broker host\n    port=..., # MQTT broker port\n    client_id=..., # MQTT client ID\n    request_topic=..., # Request topic that Daemon subscribes to\n    response_topic=..., # Response topic that Daemon publishes responses to\n    qos=1,\n    keepalive=25\n)\ntransport = MqttTransport(params=params, auto_init=True)\n\nrequest = BondedDevicesRequest()\nresponse: BondedDevicesResponse = transport.send_and_receive(request=request, timeout=10)\n\nprint(response.bonded)\n```\n\n## Documentation\n\nFor more information, check out our [API reference](https://apidocs.iqrf.org/iqrfpy/latest/iqrfpy.html).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "MQTT transport extension for iqrfpy",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport/-/blob/master/changelog.md",
        "Homepage": "https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport",
        "Issue tracker": "https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport/-/issues",
        "Source code": "https://gitlab.iqrf.org/open-source/iqrf-sdk/iqrfpy/iqrf-mqtt-transport"
    },
    "split_keywords": [
        "iqrf",
        " mqtt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6744dc70d00abf0f16662187958e72fc9193d4d63261b31a747b54609f49ef29",
                "md5": "e9612e9d43cf637c388996ac4ab05688",
                "sha256": "933a522ac64f216fcea50e84314a638509f127139ab8c0af5773cc463bcadeb7"
            },
            "downloads": -1,
            "filename": "iqrfpy_mqtt_transport-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e9612e9d43cf637c388996ac4ab05688",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 11367,
            "upload_time": "2024-04-02T15:33:24",
            "upload_time_iso_8601": "2024-04-02T15:33:24.610764Z",
            "url": "https://files.pythonhosted.org/packages/67/44/dc70d00abf0f16662187958e72fc9193d4d63261b31a747b54609f49ef29/iqrfpy_mqtt_transport-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca145ff80166de3b9be795af89d728afc97ad4c1fbf9b08af362587659231483",
                "md5": "731b986c7f9d359dcf549de21496f82d",
                "sha256": "7d1100e2cc2b4c79938d7af4b635ab46a05ff21e4d456f2359dea63ec7726026"
            },
            "downloads": -1,
            "filename": "iqrfpy-mqtt-transport-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "731b986c7f9d359dcf549de21496f82d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10351,
            "upload_time": "2024-04-02T15:33:26",
            "upload_time_iso_8601": "2024-04-02T15:33:26.627514Z",
            "url": "https://files.pythonhosted.org/packages/ca/14/5ff80166de3b9be795af89d728afc97ad4c1fbf9b08af362587659231483/iqrfpy-mqtt-transport-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-02 15:33:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "iqrfpy-mqtt-transport"
}
        
Elapsed time: 0.25422s