OpenProto

Getting started

1. Install the generator

pip install openproto-gen

2. Write a schema

message SensorReading {
  station: string
  taken_at: timestamp
  temperature_c: float32
  humidity: uint8 optional
}

3. Generate code

openproto-gen --lang python --out ./gen sensor.oproto

The generator writes one module per message. Re-run it whenever the schema changes; generated files carry a header so they are easy to exclude from review.

4. Validate existing data

openproto-gen check sensor.oproto samples/*.bin

Validation reports the first field that does not match, with its byte offset.