Metadata-Version: 2.4
Name: dexcomm
Version: 0.4.6
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
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: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: System :: Networking
Requires-Dist: numpy>=1.26.0
Requires-Dist: orjson>=3.11.3
Requires-Dist: zstandard>=0.25.0
Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: protobuf>=6.32.1 ; extra == 'dev'
Requires-Dist: pillow>=9.0.0 ; extra == 'dev'
Requires-Dist: maturin>=1.9.6 ; extra == 'dev'
Requires-Dist: patchelf>=0.17 ; sys_platform == 'linux' and extra == 'dev'
Provides-Extra: dev
License-File: LICENSE-AGPL
Summary: Accelerated communication library using Zenoh for robotics and AI
Keywords: communication,robotics,AI,zenoh,high-performance
Home-Page: https://github.com/dexmate-ai/dexcomm
Author-email: Dexmate <contact@dexmate.ai>
Maintainer-email: Dexmate <contact@dexmate.ai>
License-Expression: AGPL-3.0-only
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# DexComm - High-Performance Communication Library

High-efficiency pub/sub and RPC for robotics and AI. Zero configuration required.

## Installation

### System Dependencies

**Linux (Ubuntu/Debian):**
```bash
sudo apt-get update
sudo apt-get install ffmpeg libjpeg-turbo8 -y
```

**macOS:**
```bash
brew install ffmpeg libjpeg-turbo
```

### Install

```bash
pip install dexcomm
```

### Platform Support

- **Python**: 3.10+
- **Linux**: x86_64, aarch64
- **macOS**: x86_64, arm64 (Apple Silicon)

## Quick Start

### Raw API (Simplest)

```python
from dexcomm import Publisher, Subscriber
from dexcomm.codecs import PickleDataCodec

# Publisher
pub = Publisher("sensor/temperature", encoder=PickleDataCodec.encode)
pub.publish({"value": 25.5, "unit": "celsius"})

# Subscriber
sub = Subscriber("sensor/temperature",
                 decoder=PickleDataCodec.decode,
                 callback=lambda msg: print(f"Received: {msg}"))
```

### Node Pattern (ROS-like)

```python
from dexcomm import Node
from dexcomm.codecs import PickleDataCodec

class RobotController:
    def __init__(self):
        self.node = Node("controller", namespace="robot1")
        self.cmd_pub = self.node.create_publisher("cmd_vel", encoder=PickleDataCodec.encode)
        self.node.create_subscriber("odometry", self.on_odometry, decoder=PickleDataCodec.decode)

    def on_odometry(self, msg):
        self.cmd_pub.publish({"linear": 0.5, "angular": 0.0})

robot = RobotController()
input("Press Enter to stop...\n")
```

### Manager Pattern (Dynamic Topics)

```python
from dexcomm import SubscriberManager
from dexcomm.codecs import PickleDataCodec

manager = SubscriberManager()

# Add/remove topics at runtime
manager.add("sensors/lidar", callback=lambda msg: print(msg), decoder=PickleDataCodec.decode)
manager.add("sensors/imu", callback=lambda msg: print(msg), decoder=PickleDataCodec.decode)
manager.remove("sensors/lidar")
```

### Services (RPC)

```python
from dexcomm import Service, ServiceClient
from dexcomm.codecs import PickleDataCodec

# Server
service = Service("math/add",
                  lambda req: {"sum": req["a"] + req["b"]},
                  request_decoder=PickleDataCodec.decode,
                  response_encoder=PickleDataCodec.encode)

# Client
client = ServiceClient("math/add",
                       request_encoder=PickleDataCodec.encode,
                       response_decoder=PickleDataCodec.decode)
result = client.call({"a": 5, "b": 3})
print(result)  # {"sum": 8}
```

## Remote Robot Connection

Connect directly to a remote robot with a single environment variable:

```bash
# Port defaults to 7447 if omitted:
export ROBOT_IP=192.168.50.20
# Or with explicit port:
export ROBOT_IP=192.168.50.20:7447
```

When `ROBOT_IP` is set, dexcomm switches to client mode and connects directly to the specified address. Port `7447` is used by default if not specified.

## License

AGPL-3.0 - see the `LICENSE` file for details.

Copyright (c) 2026 Dexmate. All rights reserved.

For licensing inquiries: contact@dexmate.ai

