{ "info": { "author": "Matthias Hannig", "author_email": "matthias@hannig.cc", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "llama\n=====\n\nAn opinionated library for writing services on a MQTT message bus.\n\nWhy?\n----\n\nSomething along the lines of: After implementing\n`DaliQTT `__ I wanted something more\ngeneralized to create new services more easily.\n\nAlso see `Alpaca `__, the Go\nimplementation of this library.\n\nInstallation\n------------\n\nThe package is available via pypi as ``llama-mqtt``, so for installation\njust type:\n\n::\n\n pip3 install llama-mqtt\n\nHow to use\n----------\n\nCreating a new service in your network is now as easy as:\n\n.. code:: python\n\n\n # Connect to MQTT broker and start dispatch loop\n dispatch, receive = mqtt.connect(\"localhost:1883\", {\n \"strings\": \"v1/simple/strings\",\n })\n\n handle(dispatch, receive())\n\nWith a handler like\n\n.. code:: python\n\n def handle(dispatch, actions):\n \"\"\"Process incoming actions\"\"\"\n\n for action in actions:\n if action[\"type\"] == REVERSE_REQUEST:\n dispatch(_handle_reverse(action[\"payload\"]))\n\nThe ``receive`` function can be used in a blocking and non-blocking\nfashion by passing a ``timeout`` in seconds (e.g.\n``receive(timeout=0.25)`` and it can be used in a one shot kind of way,\nby passing ``once=True``.\n\nThis way ``receive(once=True)`` will block until an action is received,\nor (if specified) the ``timeout`` will occure.\n\nError handling\n~~~~~~~~~~~~~~\n\nIn case decoding the MQTT payload failed, an\n``llama.actions.MESSAGE_DECODE_ERROR_RESULT`` is received.\n\nExample\n~~~~~~~\n\nFor a simple working example please checkout the\n`examples/reverser/reverser.py `__\nstring reversal service.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cameliot/llama", "keywords": "mqtt,actor,react,service", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "llama-mqtt", "package_url": "https://pypi.org/project/llama-mqtt/", "platform": "", "project_url": "https://pypi.org/project/llama-mqtt/", "project_urls": { "Homepage": "https://github.com/cameliot/llama" }, "release_url": "https://pypi.org/project/llama-mqtt/0.5.0/", "requires_dist": null, "requires_python": ">=3", "summary": "An opinionated library for writing MQTT services", "version": "0.5.0" }, "last_serial": 3578765, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "844d4d265067e15a0d70f3f1b9d9e398", "sha256": "ecf13a911b17914f6467b34ce587fd64a719aa488358f05133b2b8a1582884f6" }, "downloads": -1, "filename": "llama_mqtt-0.4.1-py3.5.egg", "has_sig": false, "md5_digest": "844d4d265067e15a0d70f3f1b9d9e398", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": ">=3", "size": 11137, "upload_time": "2018-02-09T10:27:43", "url": "https://files.pythonhosted.org/packages/3d/90/9cc853a91fbc6c43db67caba9a86a94efd042cfa6ecf7981cca539a8cd33/llama_mqtt-0.4.1-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "67c4595fc33e50cadef710cee2c6e591", "sha256": "36e3fd4b35766e698796f1fc47d228de69e2a8d14d2288d9f02b62bd4baea450" }, "downloads": -1, "filename": "llama-mqtt-0.4.1.tar.gz", "has_sig": false, "md5_digest": "67c4595fc33e50cadef710cee2c6e591", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 4767, "upload_time": "2018-02-09T10:27:44", "url": "https://files.pythonhosted.org/packages/41/59/02c430a59f727f79bede3cfcbc9244d2e413fe4d8e71ce90107bb8458eb7/llama-mqtt-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "c599e9b1deaf6c938d1f7cb18d3275c9", "sha256": "aed99f10da72702eafeb1342a10cfd83a2cbe96cd6f2b6b046ceb9c0e7622651" }, "downloads": -1, "filename": "llama-mqtt-0.4.2.tar.gz", "has_sig": false, "md5_digest": "c599e9b1deaf6c938d1f7cb18d3275c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5118, "upload_time": "2018-02-09T10:49:01", "url": "https://files.pythonhosted.org/packages/3e/87/f4db8cbd38fd075530bac76e1978aa7afaf01bebe164fd514738749abd8e/llama-mqtt-0.4.2.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "de48033968135e96bf2c62596bbe5be6", "sha256": "65813aeb7bcdddb46ed546e5039da37569fcdab1cdd6aaccd463edd08fe7cb12" }, "downloads": -1, "filename": "llama-mqtt-0.5.0.tar.gz", "has_sig": false, "md5_digest": "de48033968135e96bf2c62596bbe5be6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5165, "upload_time": "2018-02-13T15:31:53", "url": "https://files.pythonhosted.org/packages/80/c7/e348f90a987b7785752f70fcf50fbf634349df74122803daaa471810d9de/llama-mqtt-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de48033968135e96bf2c62596bbe5be6", "sha256": "65813aeb7bcdddb46ed546e5039da37569fcdab1cdd6aaccd463edd08fe7cb12" }, "downloads": -1, "filename": "llama-mqtt-0.5.0.tar.gz", "has_sig": false, "md5_digest": "de48033968135e96bf2c62596bbe5be6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5165, "upload_time": "2018-02-13T15:31:53", "url": "https://files.pythonhosted.org/packages/80/c7/e348f90a987b7785752f70fcf50fbf634349df74122803daaa471810d9de/llama-mqtt-0.5.0.tar.gz" } ] }