A python wrapper around libcluon
Project description
pycluon
A python wrapper around libcluon. pycluon
aims to follow the API of libcluon as closely as possible to avoid surprises.
So far, pycluon
wraps the following concepts from libcluon:
- Envelope
- OD4Session
- UDPSender
- UDPReceiver
- TCPConnection
- TCPServer
It also bundles the following command-line applications:
- protoc
- cluon-msc
- cluon-OD4toStdout
- cluon-OD4toJSON
- cluon-LCMtoJSON
- cluon-filter
- cluon-livefeed
- cluon-rec2csv
- cluon-replay
Versioning
pycluon version |
libcluon version |
---|---|
0.1.0 | 0.0.140 |
0.1.1 | 0.0.140 |
Installation
pycluon
is available on PyPI:
pip install pycluon
Examples
Import an odvd specification into a python module
from pycluon.importer import import_odvd
my_module = import_odvd("/path/to/my/odvd/specification.odvd")
Send an envelope
import time
from pycluon import OD4Session, Envelope
session = OD4Session(111)
message = my_module.MyMessage()
envelope = Envelope()
envelope.sent = envelope.sampled = time.time()
envelope.serialized_data = message.SerializeToString()
envelope.data_type = 13
envelope.sender_stamp = 13
session.send(envelope)
Receive an envelope
import time
from pycluon import OD4Session
session = OD4Session(111)
def callback(envelope):
message = my_module.MyMessage()
message.ParseFromString(envelope.serialized_data)
print(f"Received at {envelope.received} seconds since epoch")
session.add_data_trigger(13, callback)
while session.is_running():
time.sleep(0.01)
See the tests for usage of UDPSender
, UDPReceiver
, TCPConnection
and TCPServer
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for pycluon-0.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f86db39f3d1ee447f9ac5bb123bc037c6608390d80acc087f6c75f54781688 |
|
MD5 | 6fd6e1bb18dac115853dabfd0e06e650 |
|
BLAKE2b-256 | bac079b74c3ad5e5d41f46729bcde4f4114f861439af0900d1b8c72f8502a1c5 |
Close
Hashes for pycluon-0.1.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b024f874d326280958d16b84ac87ab7acfbb0f42fc0c6a5bf3e5c5039c026771 |
|
MD5 | a26e5a0dfd7a9e2dff34a1cc52bdc725 |
|
BLAKE2b-256 | a6ff4d51274994c67dd2a2440422a400e8036184df15dc4788ee5eefd946493c |
Close
Hashes for pycluon-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1fbacbb5bf19155e631bfdd12d5780a728cb5d716658a40ac09fcb7b4965656 |
|
MD5 | b7d039967b034622b095ea7aace24cb1 |
|
BLAKE2b-256 | db61b8709f05385a92bb26bb98d0a74b704d40ab31f18da4bea0715fb57bfd44 |
Close
Hashes for pycluon-0.1.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c43ccb00f3dd65e7e37c9694520cc3400d5157bb81d4e8f3495e3f84046a29 |
|
MD5 | 1af0d9a67b3d69e9dd63da320f0d7a6b |
|
BLAKE2b-256 | 31c2629ab5ee2fea2bf61076081a1f7cd3649b180ca72db628ed7bd5dd480785 |
Close
Hashes for pycluon-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84be67005f3a56d227f193be7ab81ae68dcc2cfa26bcb835a6a19ad32b6fe520 |
|
MD5 | f18d8ced8478bbbc936bdf8578d6d880 |
|
BLAKE2b-256 | 616cf4e75ccd05816dbd3cd9a8ff24d8d054ac87fa935c7b4df6a0ac949e4a48 |
Close
Hashes for pycluon-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1976edc653ed29454461ff6aa314fd63f1562ef851812ec83f4c605914c608e |
|
MD5 | 509f72c48cd2ac9c097daba700d13e6e |
|
BLAKE2b-256 | ca9bf075d6e757c5c84207f78c3fec53e5c3b17060a313407fc3992838672713 |
Close
Hashes for pycluon-0.1.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c40d487ceb97c342c7fb53544668e9001b3727900751eb92a528e6961703bd9 |
|
MD5 | c69a07c5383408d4557e0e354067a963 |
|
BLAKE2b-256 | 1b56826d66156977a728e9c77db40f33f9d46a4185d58c0181b7459e4cb441fd |
Close
Hashes for pycluon-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd89236955744b20b54091f062e969acdca84f85c48a6d71a006c2951053af2d |
|
MD5 | 9fbdb322a6859dd174a81718a3d82766 |
|
BLAKE2b-256 | 5eed1906f8ab49380f5010cae0119070a3810e5479db2a5bb0ca70b46a31d6ca |
Close
Hashes for pycluon-0.1.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51d7232d0cf0eba109cc4263479e3b5c6f7bdefc96876c199e89c082e1df872a |
|
MD5 | 8c970f9f8c9515b993570eed7fca29d6 |
|
BLAKE2b-256 | 56a3c3d6c982c45d58238f97c85ba483a2c2bef2348edb71fbd1d5d6dee4b0c1 |
Close
Hashes for pycluon-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7602f590e9daa2505295322db67a283caf812aa798e4469c3f4384dde023858d |
|
MD5 | 954fc856cb04217727fa3edf69b3e83e |
|
BLAKE2b-256 | 18153d2b6fb987aa02a8d1e16e199727af5c9ef046e4c6296b696033096f132f |
Close
Hashes for pycluon-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fbd896ffefedc7dedfed447950cdf510ae35c48b99fa2650009bd4549f21731 |
|
MD5 | 86eba6cb8560eb3391322d42d5acd53d |
|
BLAKE2b-256 | c0d3a57983299048b54b8837d703893703b23ad05057a69a0101fb3f6bc979b4 |
Close
Hashes for pycluon-0.1.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19b092fa56b9ee86f4471fd413f04b68517a26e383e82575f2afd2a8b09c4b9 |
|
MD5 | c025ad037572637327c11437664e6230 |
|
BLAKE2b-256 | 7b3c0294d51192fa8e3cfeac2b5b14957f413efeb6b2afbfd49d907d780593b8 |
Close
Hashes for pycluon-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0dbfda477816c51c90d8333d92b768f2317dd07e461d9c2c3c3041b081edea |
|
MD5 | 8ce48fe4e3a129239553421f3b1914c3 |
|
BLAKE2b-256 | 03443871d9eed0a024700647443e34fdfc2165e5f2291760945c2f5feefeccd3 |
Close
Hashes for pycluon-0.1.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb4f1be7df9dae6101c87f4b0c1c4858a82337675ff3d0f43db510ee71a959b6 |
|
MD5 | 69fe6270353d060a0ee4a587858a5adc |
|
BLAKE2b-256 | 0a4e5cafdb496a45931eede8bec5e053c3eca77b43a9cf231dc1a4417c817a91 |
Close
Hashes for pycluon-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbfc9fab2b857942328619ff11684eb099a727fe01f0feccf998f0fe60aaac34 |
|
MD5 | d95bf2c4a34d29c1037631ed038800dc |
|
BLAKE2b-256 | 97faee30d1feabdfb72a5ea9cd1123637390012f631be38658e9c0199d679c1b |
Close
Hashes for pycluon-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 641ed29e85c657a930ce656f5facf9e5c7ddd3331dc1b4e768a10df5f87d316d |
|
MD5 | adf9569a442830290b02e8ab1c7160c9 |
|
BLAKE2b-256 | a6cd63145b1ab49dde63c640c6a95fda9a2a812238b5ccb6e78a08904ed6909e |
Close
Hashes for pycluon-0.1.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c8fddc9661bcc3e1fd02e7894a7e753d4fb998f0b03b1fdfc755e7fe38aaa3 |
|
MD5 | 32f220bdf5253ddd19c988e8237c165f |
|
BLAKE2b-256 | 9cb1131b459f859ec0b701248d293795665165f2cf94aa080a885ae01ab264a6 |
Close
Hashes for pycluon-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5b3cf63274d2fe413cd31d45a3fbc4694b9d6f012467e0b62935725d3a72152 |
|
MD5 | 2383a82622dc655d3363d95dae2581da |
|
BLAKE2b-256 | 9e5d89830074b1222ef25578999a875f8a8aa64af55982665d396bc228b6cad0 |
Close
Hashes for pycluon-0.1.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7784dcb1b4f31813aafd506d144c19b28b7e96b98f3f37be5d9a6b7c6ec7e437 |
|
MD5 | f0989472e75e0af53e1af634e4687be2 |
|
BLAKE2b-256 | 6b4cec41a453670d139491e2db4923fe4607b9c0482dd164207036805c0b426a |
Close
Hashes for pycluon-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5240a1b41198da603048a2c90315638a4a3577da127a9795dea0204e81d40749 |
|
MD5 | cbddecca0ae865b1fc8f73182b3dc6e1 |
|
BLAKE2b-256 | 816ced426f122454a815721e23080680be392e41553f8bb7bba386e37cf94202 |