Metadata-Version: 2.3
Name: embrpc
Version: 0.0.2
Project-URL: Documentation, https://github.com/mbodiai/embrpc#readme
Project-URL: Issues, https://github.com/mbodiai/embrpc/issues
Project-URL: Source, https://github.com/mbodiai/embrpc
Author: mbodiai
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Requires-Dist: backoff==2.2.1
Requires-Dist: click==8.1.7
Requires-Dist: paramiko==3.4.0
Requires-Dist: pydantic==2.8.2
Requires-Dist: rich==13.7.1
Requires-Dist: scp==0.15.0
Description-Content-Type: text/markdown

# rpc



## Installation

```bash
pip install rpc
```

## Usage

```python
from embrpc.rpcscp import SCPServer, SCPClient


    class HandControl(BaseModel):
        x: float
        y: float
        z: float
        roll: float
        pitch: float
        yaw: float

    """Feed an LLM output to the robot running a server."""
    client = SCPClient(
        host="10.4.20.28",
        # host="1.2.3.4",
        user="user",
        password="pass",  # noqa: S106
        inbound_model=HandControl,
        outbound_model=HandControl,
        inbound_path="~/data_in.json",
        outbound_path="~/data_out.json",
    )

    client.send_data(HandControl(x=0.1, y=0.2, z=0.3, roll=0.4, pitch=0.5, yaw=0.6))
    data = client.receive_data()
    logging.info(data)

    locobot_server = SCPServer(
        inbound_path="~/data_in.json",
        outbound_path="~/data_out.json",
        inbound_model=HandControl,
        outbound_model=HandControl,
    )
    execute = lambda x: print(f"Executing {x}")
    locobot_server.poll(execute)
```