Metadata-Version: 2.4
Name: plcm
Version: 0.0.0a4
Summary: Alternative, pure-python implementation of lcm.
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: typing-extensions>=4.15
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/Pluviolithic/pylcm
Project-URL: Issues, https://github.com/Pluviolithic/pylcm/issues
Description-Content-Type: text/markdown

# pylcm

This project is a pure-python implementation of
[lcm](https://github.com/lcm-proj/lcm)'s netcode. It is not a drop-in
replacement. Instead, it provides alternative and (ideally) more Pythonic
interfaces. However, it is meant to be interoperable with any other lcm client
over the network.

Over time, some of the tools like lcmgen or lcm-spy may be reimplemented here
in Python, but the primary focus is on the netcode and idiomatic implementations
of that netcode.

# installation

The `plcm` package is available for installation using
[pip](https://pypi.org/project/pip/) or your favorite package manager:

```sh
pip3 install plcm
```

# usage

```py
from plcm import Lcm

def callback(channel: str, data: bytes) -> None:
    print(channel, data)

connection = Lcm().connect("tcpq://")
subscription = connection.subscribe("channelname", callback)

...

connection.publish("channelname", b"\x00\x00\x00\x00")

...

subscription.unsubscribe()
connection.publish("channelname", b"\x00\x00\x00\x00")

...

connection.disconnect()
```
