Mercurial > code > home > repos > homeauto
view service/iot2/py_read_messages_demo.py @ 1512:1e9cfec1be78
don't require first arg on PatchedGraph.serialize
Ignore-this: bc695823e03dbd012e03efa4e40b6aca
darcs-hash:1dbf9271b5ca55c78987c474ef223af9d5b811d2
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 03 Feb 2020 23:46:29 -0800 |
parents | 455b1b80516e |
children |
line wrap: on
line source
import sys import capnp # (No compile step) messages_capnp = capnp.load('messages.capnp') print(dir(messages_capnp)) report = messages_capnp.Report.new_message() report.sensor = b'hello' report.value = 1.234 print(repr(report.to_bytes()))