Welcome to MsgCenterPy’s Documentation!

License PyPI version Python versions

MsgCenterPy is a multi-format message conversion system based on a unified instance manager architecture, supporting seamless conversion between ROS2, Pydantic, Dataclass, JSON, Dict, YAML and JSON Schema.

πŸ“¦ Installation

Basic Installation

pip install msgcenterpy

With Optional Dependencies

# Install ROS2 support
conda install ros-humble-ros-core ros-humble-std-msgs ros-humble-geometry-msgs -c robostack-staging

From Source

git clone https://github.com/ZGCA-Forge/MsgCenterPy.git
cd MsgCenterPy
pip install -e .[dev]

πŸš€ Quick Start

Basic Usage

from msgcenterpy import MessageInstance, MessageType

# Create message instance from dictionary
data = {
    "name": "sensor_001",
    "readings": [1.0, 2.0, 3.0],
    "active": True
}
dict_instance = MessageInstance.create(MessageType.DICT, data)

# Generate JSON Schema
schema = dict_instance.get_json_schema()
print(schema)

🎯 Supported Formats

Format

Read

Write

JSON Schema

Type Constraints

ROS2

βœ…

βœ…

βœ…

βœ…

JSON Schema

βœ…

βœ…

βœ…

βœ…

Pydantic

🚧

🚧

🚧

🚧

Dataclass

🚧

🚧

🚧

🚧

JSON

🚧

🚧

🚧

🚧

Dict

🚧

🚧

🚧

🚧

YAML

🚧

🚧

🚧

🚧

Note

βœ… Fully Supported | 🚧 In Development

πŸ› οΈ Development

Development Environment Setup

For detailed development guidelines, please refer to the Development section.

πŸ“š Documentation Contents

Indices and Tables

🀝 Community & Support