libcoapy


Namelibcoapy JSON
Version 2024.6.17 PyPI version JSON
download
home_pageNone
SummaryPython module to communicate over the CoAP protocol
upload_time2024-06-17 18:27:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.0
licensePermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords coap network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            libcoapy
========

libcoapy project enables communication over the CoAP protocol (RFC 7252). The
`llapi` module provides ctypes-based wrappers for the [libcoap](https://libcoap.net/)
C library. The `libcoapy` module uses `llapi` to provide a high-level class interface
to the libcoap functions.

Dependencies:
-------------

 - libcoap

Status
------

This project is still in early development. Several functions of the libcoap
library are not yet available and existing high-level libcoapy APIs might change
in the future.

Example
-------

```python
from libcoapy import *

if len(sys.argv) < 2:
	uri_str = "coaps://localhost/.well-known/core"
else:
	uri_str = sys.argv[1]

ctx = CoapContext()

session = ctx.newSession(uri_str, hint="user", key="password")

def rx_cb(session, tx_msg, rx_msg, mid):
	print(rx_msg.bytes)
	if not tx_msg.observe:
		session.ctx.stop_loop()

session.sendMessage(payload="example data", observe=False, response_callback=rx_cb)

ctx.loop()
```

For an example with the low-level API, see `examples/ll-client.py`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "libcoapy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": null,
    "keywords": "CoAP, network",
    "author": null,
    "author_email": "Mario Kicherer <dev@kicherer.org>",
    "download_url": "https://files.pythonhosted.org/packages/e0/7e/3216820665eb5b467b39cb05c12ca962daa8a6bcc52b6a6461612ba5730c/libcoapy-2024.6.17.tar.gz",
    "platform": null,
    "description": "libcoapy\n========\n\nlibcoapy project enables communication over the CoAP protocol (RFC 7252). The\n`llapi` module provides ctypes-based wrappers for the [libcoap](https://libcoap.net/)\nC library. The `libcoapy` module uses `llapi` to provide a high-level class interface\nto the libcoap functions.\n\nDependencies:\n-------------\n\n - libcoap\n\nStatus\n------\n\nThis project is still in early development. Several functions of the libcoap\nlibrary are not yet available and existing high-level libcoapy APIs might change\nin the future.\n\nExample\n-------\n\n```python\nfrom libcoapy import *\n\nif len(sys.argv) < 2:\n\turi_str = \"coaps://localhost/.well-known/core\"\nelse:\n\turi_str = sys.argv[1]\n\nctx = CoapContext()\n\nsession = ctx.newSession(uri_str, hint=\"user\", key=\"password\")\n\ndef rx_cb(session, tx_msg, rx_msg, mid):\n\tprint(rx_msg.bytes)\n\tif not tx_msg.observe:\n\t\tsession.ctx.stop_loop()\n\nsession.sendMessage(payload=\"example data\", observe=False, response_callback=rx_cb)\n\nctx.loop()\n```\n\nFor an example with the low-level API, see `examples/ll-client.py`.\n",
    "bugtrack_url": null,
    "license": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python module to communicate over the CoAP protocol",
    "version": "2024.6.17",
    "project_urls": {
        "Homepage": "https://github.com/anyc/libcoapy/",
        "Issues": "https://github.com/anyc/libcoapy/issues"
    },
    "split_keywords": [
        "coap",
        " network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d19dd75eee9934cd3b477b0c8f9dd1c362d44132c2bb4ff92ac30bdb2fe880c",
                "md5": "e758f2d12715b38c587e3a8c70c9be5f",
                "sha256": "284e4af7d38267f1bc40c400bcdbd38ce72599574a7adba2319a8ab068b94b85"
            },
            "downloads": -1,
            "filename": "libcoapy-2024.6.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e758f2d12715b38c587e3a8c70c9be5f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 12900,
            "upload_time": "2024-06-17T18:26:54",
            "upload_time_iso_8601": "2024-06-17T18:26:54.144017Z",
            "url": "https://files.pythonhosted.org/packages/5d/19/dd75eee9934cd3b477b0c8f9dd1c362d44132c2bb4ff92ac30bdb2fe880c/libcoapy-2024.6.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e07e3216820665eb5b467b39cb05c12ca962daa8a6bcc52b6a6461612ba5730c",
                "md5": "849097974cd9192a8987a51be82ac04f",
                "sha256": "2e094f343302a0770a6b07092520b62adda9d19a882a0583c14e6108f4f641e7"
            },
            "downloads": -1,
            "filename": "libcoapy-2024.6.17.tar.gz",
            "has_sig": false,
            "md5_digest": "849097974cd9192a8987a51be82ac04f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 12365,
            "upload_time": "2024-06-17T18:27:01",
            "upload_time_iso_8601": "2024-06-17T18:27:01.143411Z",
            "url": "https://files.pythonhosted.org/packages/e0/7e/3216820665eb5b467b39cb05c12ca962daa8a6bcc52b6a6461612ba5730c/libcoapy-2024.6.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-17 18:27:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anyc",
    "github_project": "libcoapy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "libcoapy"
}
        
Elapsed time: 0.25930s