Metadata-Version: 2.4
Name: visio-schema
Version: 0.3.0
Summary: Visio wire contract — generated protobuf bindings + the framing codec
Author: General Intelligence Labs
License: MIT
Project-URL: Homepage, https://github.com/General-Intelligence-Labs/visio-schema
Project-URL: Repository, https://github.com/General-Intelligence-Labs/visio-schema
Project-URL: Issues, https://github.com/General-Intelligence-Labs/visio-schema/issues
Project-URL: Changelog, https://github.com/General-Intelligence-Labs/visio-schema/blob/main/CHANGELOG.md
Keywords: protobuf,robotics,sensors,mcap,foxglove,wire-protocol,visio
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
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 :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: protobuf>=5.26
Requires-Dist: cobs>=1.2
Requires-Dist: mcap>=1.1
Requires-Dist: pyserial>=3.5
Requires-Dist: foxglove-sdk>=0.10
Requires-Dist: rerun-sdk>=0.24
Requires-Dist: av>=11
Requires-Dist: aiohttp>=3.9
Requires-Dist: zeroconf>=0.130
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "dev"

# visio-schema

The **wire contract** for the Visio sensor ecosystem: the generated protobuf
message bindings plus a small, hand-written framing codec, packaged so you can
read a live device or a recording with one `pip install`. It is the single
source of truth for *what Visio data looks like on the wire*; the transport,
bus, and recording stack live in a separate layer.

Imported as `visio_schema`. Full docs, the wire spec, and C++ sources are in the
[GitHub repository](https://github.com/General-Intelligence-Labs/visio-schema).

## Install

```bash
pip install visio-schema
```

One install includes MCAP read/write (`read_mcap` / `McapWriter`) and the
`visio-display` live viewer — no extras to choose. Released wheels (Linux
`manylinux_2_28` x86_64, macOS `universal2`, CPython 3.10–3.13) bundle an optional
native reader for higher throughput. If no wheel matches your platform, the sdist
installs a pure-Python reader with identical behavior — only throughput differs.

## Quickstart

```python
from visio_schema import read_serial, read_mcap, message_class

# live device -> (Message, Channel) rows
for msg, ch in read_serial("/dev/ttyACM0"):
    cls = message_class(ch.schema_name)        # resolve the payload type
    payload = cls.FromString(msg.payload)
    print(ch.topic, payload)

# replay a recording
for msg, ch in read_mcap("run.mcap"):
    ...
```

Send commands and read replies with `serial_endpoint(...)` + `command_message`.
See [usage.md](https://github.com/General-Intelligence-Labs/visio-schema/blob/main/docs/usage.md)
for the three end-to-end recipes.

## `visio-display` viewer

The package installs a `visio-display` console command that reads a live device
(serial or TCP) or replays an MCAP, and fans it out to a live
[Foxglove](https://foxglove.dev) WebSocket, a live [Rerun](https://rerun.io)
viewer, and/or an MCAP recording:

```bash
visio-display --serial /dev/ttyACM0 --rerun
visio-display --tcp my-device.local --foxglove
visio-display --mcap-in run.mcap --rerun
# also runnable as: python -m visio_schema.display
```

## License

MIT — see [LICENSE](https://github.com/General-Intelligence-Labs/visio-schema/blob/main/LICENSE).
