#iot #python #data-processing #server-side #client-side #codde-pi #rust

codde_protocol

Multi Communication protocol in heart of the C.O.D.D.E. Pi framework

3 releases

new 0.1.4 Apr 15, 2024
0.1.2 Apr 1, 2024
0.1.1 Feb 23, 2024

#584 in Hardware support

Download history 140/week @ 2024-02-19 31/week @ 2024-02-26 2/week @ 2024-03-04 6/week @ 2024-03-11 161/week @ 2024-04-01

167 downloads per month

Custom license

28KB
626 lines

CODDE Protocol

actions status crates.io pub.dev pypi.org

Multi Communication protocol in heart of the C.O.D.D.E. Pi framework.

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.

Buy Me A Coffee

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.

Show me the code

With one code structure and a dozen of lines, you can receive data from socket, bluetooth of UART com. Just need a port address and registered actions on data is received :


import codde_protocol
import time

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

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

if __name__ == "__main__":
    print('open server...')
    server.open()
    server.on(1, "ToggleButton", action)
    # server.callback(1, cp.ServerStatus.Idle, cp.ConfirmResult(True))
    server.serve()
    time.sleep(2)
    server.close()

Roadmap

Protocols:

  • WebSocket
  • Bluetooth
  • UART
  • HTTP

Dependencies

~11–23MB
~324K SLoC