codde-protocol


Namecodde-protocol JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/codde-pi/codde_protocol
SummaryMulti Communication protocol in heart of the C.O.D.D.E. Pi framework
upload_time2024-07-10 13:51:33
maintainerNone
docs_urlNone
authorMathis Lecomte <vm.lecomte@gmail.com>
requires_python>=3.8
licenseNone
keywords rust python codde_pi iot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CODDE Protocol

[![Build & Test](https://github.com/codde-pi/codde_protocol/actions/workflows/build.yml/badge.svg)](https://github.com/codde-pi/codde_protocol/actions/workflows/build.yml)
[![crates.io](https://img.shields.io/crates/v/codde_protocol?logo=rust)](https://crates.io/crates/codde_protocol)
[![pub.dev](https://img.shields.io/pub/v/codde_protocol.svg?include_prereleases&color=blue)](https://pub.dev/packages/codde_protocol)
[![pypi.org](https://img.shields.io/pypi/v/codde_protocol.svg?logo=python&style=flat-square)](https://pypi.org/project/codde_protocol)

CODDE Protocol is the base layer of the CODDE Pi Framework. This protocol let CODDE Pi interacts with any hardware through WiFi, Bluetooth and BLE using an embedded library and a mobile app. This technology enables users to freely interact with hardware thanks to a secure, stable and reliable technology without be (too) intrusive.

<a href="https://www.buymeacoffee.com/wddm" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

## Development

This Project is written in Rust, enabling fast serializing/deserializing and data processing.
Client side is ported for Dart/Flutter applications, and server side has been translated in python.

CODDE Protocol integrates data generated by CODDE Pi App widgets, and received by embedded systems. See https://codde-pi.com to stay tuned about new widgets integration.

## How it works

CODDE Pi is based on client-server architecture. Basically, the mobile App you download is the client side, and the base layer you embed on your project is the server side

![Widgets & CODDE Protocol](./assets/codde_pi_widget.drawio.svg)

## Usage

```python
import codde_protocol
import time
# import gpio

# instantiate server
server = CoddePiServer.use_socket('localhost:12345')

# some hardware control
# pin10 = gpio.DigitalPin(10, gpio.OUTPUT)

@event(server)
def toggle_button_1(*args):
    widget: ToggleButton = args[0]
    print("value received : ", widget.value)
    server.callback(1, ServerStatus.Idle, ConfirmResult(True))

@event(server)
def click_button_2(*args):
    pass
    # pin10.on()

if __name__ == "__main__":
    print('opening server...', end=' ')
    server.open()
    try:
    print('serve')
        server.serve()
        while True:
            sleep(1)
    except KeyboardInterrupt:
        print("CTRL + C.")
        print("Program interrupted.")
    finally:
        server.close()
```

## Roadmap

### Libraries

| Protocols          | Flutter                               | Python                                | Rust                                   | MicroPython                            |
| ------------------ | ------------------------------------- | ------------------------------------- | -------------------------------------- | -------------------------------------- |
| WebSocket (client) | <span style="color: green">Yes</span> |                                       | <span style="color: green">Yes</span>  |                                        |
| WebSocket (server) |                                       | <span style="color: green">Yes</span> | <span style="color: green">Yes</span>  | <span style="color: yellow">WIP</span> |
| Bluetooth          |                                       |                                       | <span style="color: yellow">WIP</span> |                                        |
| USB                |                                       |                                       |                                        |                                        |
| Nearby             |                                       |                                       |                                        |                                        |

### Hardware compatibility

| Protocols          | SBC (arm64)                           | RP2040                                 | Android                               | iOS                                   | x86                                   |
| ------------------ | ------------------------------------- | -------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| WebSocket (client) | <span style="color: green">Yes</span> | <span style="color: yellow">WIP</span> | <span style="color: green">Yes</span> | <span style="color: green">Yes</span> | <span style="color: green">Yes</span> |
| WebSocket (server) | <span style="color: green">Yes</span> | <span style="color: yellow">WIP</span> | <span style="color: green">Yes</span> | <span style="color: green">Yes</span> | <span style="color: green">Yes</span> |
| Bluetooth          |                                       |                                        |                                       |                                       |                                       |
| USB                |                                       |                                        |                                       | <span style="color: red">No</span>    |                                       |
| Nearby             |                                       |                                        |                                       |                                       |                                       |


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/codde-pi/codde_protocol",
    "name": "codde-protocol",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "rust, python, codde_pi, iot",
    "author": "Mathis Lecomte <vm.lecomte@gmail.com>",
    "author_email": "Mathis Lecomte <vm.lecomte@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8e/3a/3379d8e282e79d595c99c905f104403e64196c26b56bf8372cd366a9bba5/codde_protocol-0.1.6.tar.gz",
    "platform": null,
    "description": "# CODDE Protocol\n\n[![Build & Test](https://github.com/codde-pi/codde_protocol/actions/workflows/build.yml/badge.svg)](https://github.com/codde-pi/codde_protocol/actions/workflows/build.yml)\n[![crates.io](https://img.shields.io/crates/v/codde_protocol?logo=rust)](https://crates.io/crates/codde_protocol)\n[![pub.dev](https://img.shields.io/pub/v/codde_protocol.svg?include_prereleases&color=blue)](https://pub.dev/packages/codde_protocol)\n[![pypi.org](https://img.shields.io/pypi/v/codde_protocol.svg?logo=python&style=flat-square)](https://pypi.org/project/codde_protocol)\n\nCODDE Protocol is the base layer of the CODDE Pi Framework. This protocol let CODDE Pi interacts with any hardware through WiFi, Bluetooth and BLE using an embedded library and a mobile app. This technology enables users to freely interact with hardware thanks to a secure, stable and reliable technology without be (too) intrusive.\n\n<a href=\"https://www.buymeacoffee.com/wddm\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"></a>\n\n## Development\n\nThis Project is written in Rust, enabling fast serializing/deserializing and data processing.\nClient side is ported for Dart/Flutter applications, and server side has been translated in python.\n\nCODDE Protocol integrates data generated by CODDE Pi App widgets, and received by embedded systems. See https://codde-pi.com to stay tuned about new widgets integration.\n\n## How it works\n\nCODDE Pi is based on client-server architecture. Basically, the mobile App you download is the client side, and the base layer you embed on your project is the server side\n\n![Widgets & CODDE Protocol](./assets/codde_pi_widget.drawio.svg)\n\n## Usage\n\n```python\nimport codde_protocol\nimport time\n# import gpio\n\n# instantiate server\nserver = CoddePiServer.use_socket('localhost:12345')\n\n# some hardware control\n# pin10 = gpio.DigitalPin(10, gpio.OUTPUT)\n\n@event(server)\ndef toggle_button_1(*args):\n    widget: ToggleButton = args[0]\n    print(\"value received : \", widget.value)\n    server.callback(1, ServerStatus.Idle, ConfirmResult(True))\n\n@event(server)\ndef click_button_2(*args):\n    pass\n    # pin10.on()\n\nif __name__ == \"__main__\":\n    print('opening server...', end=' ')\n    server.open()\n    try:\n    print('serve')\n        server.serve()\n        while True:\n            sleep(1)\n    except KeyboardInterrupt:\n        print(\"CTRL + C.\")\n        print(\"Program interrupted.\")\n    finally:\n        server.close()\n```\n\n## Roadmap\n\n### Libraries\n\n| Protocols          | Flutter                               | Python                                | Rust                                   | MicroPython                            |\n| ------------------ | ------------------------------------- | ------------------------------------- | -------------------------------------- | -------------------------------------- |\n| WebSocket (client) | <span style=\"color: green\">Yes</span> |                                       | <span style=\"color: green\">Yes</span>  |                                        |\n| WebSocket (server) |                                       | <span style=\"color: green\">Yes</span> | <span style=\"color: green\">Yes</span>  | <span style=\"color: yellow\">WIP</span> |\n| Bluetooth          |                                       |                                       | <span style=\"color: yellow\">WIP</span> |                                        |\n| USB                |                                       |                                       |                                        |                                        |\n| Nearby             |                                       |                                       |                                        |                                        |\n\n### Hardware compatibility\n\n| Protocols          | SBC (arm64)                           | RP2040                                 | Android                               | iOS                                   | x86                                   |\n| ------------------ | ------------------------------------- | -------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |\n| WebSocket (client) | <span style=\"color: green\">Yes</span> | <span style=\"color: yellow\">WIP</span> | <span style=\"color: green\">Yes</span> | <span style=\"color: green\">Yes</span> | <span style=\"color: green\">Yes</span> |\n| WebSocket (server) | <span style=\"color: green\">Yes</span> | <span style=\"color: yellow\">WIP</span> | <span style=\"color: green\">Yes</span> | <span style=\"color: green\">Yes</span> | <span style=\"color: green\">Yes</span> |\n| Bluetooth          |                                       |                                        |                                       |                                       |                                       |\n| USB                |                                       |                                        |                                       | <span style=\"color: red\">No</span>    |                                       |\n| Nearby             |                                       |                                        |                                       |                                       |                                       |\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Multi Communication protocol in heart of the C.O.D.D.E. Pi framework",
    "version": "0.1.6",
    "project_urls": {
        "Changelog": "https://github.com/codde-pi/codde_protocol/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/codde-pi/codde_protocol",
        "Issues": "https://github.com/codde-pi/codde_protocol/issues",
        "Repository": "https://github.com/codde-pi/codde_protocol.git"
    },
    "split_keywords": [
        "rust",
        " python",
        " codde_pi",
        " iot"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fa0243a31184bc06dcb441028236a4bb73c0c8e0210f0b0b1fb02e78645ab947",
                "md5": "982b6ec6c17b1c13550d7c367874a304",
                "sha256": "b597598cf6b914aab5752069da403bd7a92ec571b7657fcc11d0a1cb3fe33f7e"
            },
            "downloads": -1,
            "filename": "codde_protocol-0.1.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "982b6ec6c17b1c13550d7c367874a304",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 397850,
            "upload_time": "2024-07-10T13:52:59",
            "upload_time_iso_8601": "2024-07-10T13:52:59.003615Z",
            "url": "https://files.pythonhosted.org/packages/fa/02/43a31184bc06dcb441028236a4bb73c0c8e0210f0b0b1fb02e78645ab947/codde_protocol-0.1.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "749152ebb15136e1e74b0c02e039041c4fa87560c09e25acf17fac0b0dc2ef04",
                "md5": "b926444bb10c09bfb213147c44ae852e",
                "sha256": "7a9d601f070ce27b03ab26796ffcb60a94002f524f10352d1515ef33e8cdac82"
            },
            "downloads": -1,
            "filename": "codde_protocol-0.1.6-cp312-cp312-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b926444bb10c09bfb213147c44ae852e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 384751,
            "upload_time": "2024-07-10T13:51:32",
            "upload_time_iso_8601": "2024-07-10T13:51:32.079706Z",
            "url": "https://files.pythonhosted.org/packages/74/91/52ebb15136e1e74b0c02e039041c4fa87560c09e25acf17fac0b0dc2ef04/codde_protocol-0.1.6-cp312-cp312-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8e3a3379d8e282e79d595c99c905f104403e64196c26b56bf8372cd366a9bba5",
                "md5": "793fb56bec0ca3c6ff66badd84e79593",
                "sha256": "d78f62b6bea5557abba765f55074c58bfcb19772839d3eb8a2c0a17aa5136919"
            },
            "downloads": -1,
            "filename": "codde_protocol-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "793fb56bec0ca3c6ff66badd84e79593",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 39212,
            "upload_time": "2024-07-10T13:51:33",
            "upload_time_iso_8601": "2024-07-10T13:51:33.753081Z",
            "url": "https://files.pythonhosted.org/packages/8e/3a/3379d8e282e79d595c99c905f104403e64196c26b56bf8372cd366a9bba5/codde_protocol-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-10 13:51:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "codde-pi",
    "github_project": "codde_protocol",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "codde-protocol"
}
        
Elapsed time: 4.28444s