rightlag / cereal

Convert gRPC .proto files to Apache .avro files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quickstart

The purpose of this module is to convert Google Protocol Buffer files to Apache Avro files. The following example demonstrates how to use the parser:

$ python parser.py -f helloworld.proto --out helloworld.avro

Given that the input file is helloworld.proto:

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

The output will be helloworld.avro:

[
    {
        "type": "record",
        "name": "HelloRequest",
        "fields": [
            {
                "type": "String",
                "name": "name"
            }
        ]
    },
    {
        "type": "record",
        "name": "HelloReply",
        "fields": [
            {
                "type": "String",
                "name": "message"
            }
        ]
    }
]

About

Convert gRPC .proto files to Apache .avro files

License:MIT License


Languages

Language:Python 100.0%