Metadata-Version: 2.4
Name: py-ctrl-os
Version: 0.6.2
Summary: Python CFFI bindings for rs_ctrl_os - distributed ZMQ pub/sub
Author-email: Han Wang <wanghan0410@126.com>
License: MIT
Project-URL: Homepage, https://github.com/LycanW/rs_ctrl_os
Project-URL: Repository, https://github.com/LycanW/rs_ctrl_os
Project-URL: Issues, https://github.com/LycanW/rs_ctrl_os/issues
Keywords: zmq,pubsub,distributed,cffi,rs_ctrl_os
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: cffi>=1.16

# py-ctrl-os

Python CFFI bindings for `rs_ctrl_os` — a distributed ZMQ pub/sub runtime.

## Install

```bash
pip install py-ctrl-os
```

On first import, the library auto-downloads `librs_ctrl_os.so` from GitHub releases.

## Quick Start

```python
from py_ctrl_os import PubSubManager, load_config

static, dynamic = load_config("config.toml")
bus = PubSubManager(static)

# Publish JSON
bus.publish_json("my_node", "status", {"hello": "world"})

# Receive
result = bus.try_recv_json("from_other_node")
if result:
    sender, topic, data = result
    print(f"From {sender}: {data}")
```

## Requirements

- Python 3.10+
- Linux x86_64 or aarch64
- `libzmq` (system library, usually pre-installed)

## License

MIT
