Write your protocol specifications in a single language (Avro IDL) and automatically generate schema definitions, code, and documentation for multiple languages and serialization frameworks, including:
- Protobuf (proto3)
- Apache Avro Schema (.avsc)
- JSON schema
- XML schema
- SQL DDL (create table)
- .. and of the other formats supported by Avrotize.
- Create a virtual environment (optional but recommended), and activate it:
python -m venv venv
source venv/bin/activate
- Install the package:
python -m pip install interface-gen
- Set up your protocol definitions and output directory.
mkdir -p my-protocols/v1.0
mkdir my-output
Place your Avro IDL definition files (.avdl) in my-protocols/v1.0
- Run the generator:
ifgen -i -p my-protocols -o my-output
For more details see the source code docs:
- Python interface_gen/README.md
- Main README.md
- The code repostitory