{ "info": { "author": "smlng", "author_email": "s@mlng.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: Implementation :: MicroPython" ], "description": "# PyCayenneLPP\n\n[![Travis-CI](https://travis-ci.com/smlng/pycayennelpp.svg?branch=master)](https://travis-ci.com/smlng/pycayennelpp)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/169fb391fec84d7e83ee69b8dad3cdc3)](https://www.codacy.com/app/smlng/pycayennelpp?utm_source=github.com&utm_medium=referral&utm_content=smlng/pycayennelpp&utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/169fb391fec84d7e83ee69b8dad3cdc3)](https://www.codacy.com/app/smlng/pycayennelpp?utm_source=github.com&utm_medium=referral&utm_content=smlng/pycayennelpp&utm_campaign=Badge_Coverage)\n[![PyPi](https://badge.fury.io/py/pycayennelpp.svg)](https://badge.fury.io/py/pycayennelpp)\n[![GitHub](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/smlng/pycayennelpp/blob/master/LICENSE)\n\nA Cayenne Low Power Payload (CayenneLPP) decoder and encoder written in Python.\nSee also [myDevicesIoT/CayenneLPP](https://github.com/myDevicesIoT/CayenneLPP)\nfor more information on the format and a reference implementation in C++.\n\nThe project is under active development. Releases will be published on the\nfly as soon as a certain number of new features and fixes have been made.\n\n## Getting Started\n\nPyCayenneLPP does not have any external dependencies, but only uses builtin\nfunctions and types of Python 3. At least Python in version 3.4 is required.\nSince version 1.2.0 MicroPython is supported, and published as a separate\npackage under `micropython-pycayennelpp`.\n\n### Python 3 Prerequisites\n\nThe PyCayenneLPP package is available via PyPi using `pip`. To install it run:\n\n```Shell\npip3 install pycayennelpp\n```\n\n### MicroPython Prerequisites\n\nMicroPython does not include the libraries `base64` and `logging` per default.\nWhile the latter rather optional for embedded devices, the former is essential.\nUsing MicroPythons `upip` module PyCayenneLPP can be installed as follows\nwithin MicroPython:\n\n```Python\nimport upip\nupip.install(\"micropython-pycayennelpp\")\n```\n\nOr alternatively run with in a shell:\n\n```Shell\nmicropython -m upip install micropython-pycayennelpp\n```\n\nThis will also install `micropython-base64` as a dependency.\n\n### Usage Examples\n\nThe following show how to utilise PyCayenneLPP in your own application\nto encode and decode data into and from CayenneLPP. The code snippets\nwork with standard Python 3 as well as MicroPython, assuming you have\ninstalled the PyCayenneLPP package as shown above.\n\n***Encoding***\n\n```Python\nfrom cayennelpp import LppFrame\n\n\n# create empty frame\nframe = LppFrame()\n# add some sensor data\nframe.add_temperature(0, -1.2)\nframe.add_humidity(6, 34.5)\n# get byte buffer in CayenneLPP format\nbuffer = frame.bytes()\n```\n\n***Decoding***\n\n```Python\nfrom cayennelpp import LppFrame\n\n\n# byte buffer in CayenneLPP format with 1 data item\n# i.e. on channel 1, with a temperature of 25.5C\nbuffer = bytearray([0x01, 0x67, 0x00, 0xff])\n# create frame from bytes\nframe = LppFrame().from_bytes(buffer)\n# print the frame and its data\nprint(frame)\n```\n\n## Contributing\n\nContributing to a free open source software project can take place in many\ndifferent ways. Feel free to open issues and create pull requests to help\nimproving this project. Each pull request has to pass some automatic tests and\nchecks run by Travis-CI before being merged into the master branch.\n\nPlease take note of the [contributing guidelines](CONTRIBUTING.md) and the\n[Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nThis is a free open source software project published under the [MIT License](LICENSE).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/smlng/pycayennelpp", "keywords": "cayenne lpp iot lora lorawan ttn", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "micropython-pycayennelpp", "package_url": "https://pypi.org/project/micropython-pycayennelpp/", "platform": "", "project_url": "https://pypi.org/project/micropython-pycayennelpp/", "project_urls": { "Homepage": "http://github.com/smlng/pycayennelpp" }, "release_url": "https://pypi.org/project/micropython-pycayennelpp/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "Encoder and Decoder for CayenneLLP", "version": "1.3.0" }, "last_serial": 5458486, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "dec605465e059b25de3d233c4f27b700", "sha256": "713665488e0f31733638471ec42582cd5758bcafd53d6f33508e4cad58dfa11d" }, "downloads": -1, "filename": "micropython-pycayennelpp-1.2.0.tar.gz", "has_sig": false, "md5_digest": "dec605465e059b25de3d233c4f27b700", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6402, "upload_time": "2019-06-27T18:20:29", "url": "https://files.pythonhosted.org/packages/74/4d/e177174c96824bccf8c4b891888828ee41f1ba93943fda1afee896fc1bb5/micropython-pycayennelpp-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "2f944af9a743f36b5133693b486071ed", "sha256": "7028575e93946a2d2dfa2baeb78c98c79d0e2e0b86ad8dbbe0d3b5db1e7a729e" }, "downloads": -1, "filename": "micropython-pycayennelpp-1.3.0.tar.gz", "has_sig": false, "md5_digest": "2f944af9a743f36b5133693b486071ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6550, "upload_time": "2019-06-27T19:21:18", "url": "https://files.pythonhosted.org/packages/d8/af/5427c65b27e672d3530950891eca9d522e28353a4bdf187af7b5a70ba6ee/micropython-pycayennelpp-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f944af9a743f36b5133693b486071ed", "sha256": "7028575e93946a2d2dfa2baeb78c98c79d0e2e0b86ad8dbbe0d3b5db1e7a729e" }, "downloads": -1, "filename": "micropython-pycayennelpp-1.3.0.tar.gz", "has_sig": false, "md5_digest": "2f944af9a743f36b5133693b486071ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6550, "upload_time": "2019-06-27T19:21:18", "url": "https://files.pythonhosted.org/packages/d8/af/5427c65b27e672d3530950891eca9d522e28353a4bdf187af7b5a70ba6ee/micropython-pycayennelpp-1.3.0.tar.gz" } ] }