Skip to content

Automatic .proto to python dataclasses code generation

Notifications You must be signed in to change notification settings

irusland/iprotopy

Repository files navigation

iprotopy

iprotopy is a Python project designed to generate source files from Protocol Buffers (protos) using the PackageGenerator class.

import logging
from pathlib import Path

from iprotopy import PackageGenerator

logging.basicConfig(level=logging.DEBUG)


if __name__ == '__main__':
    generator = PackageGenerator()
    base_dir = Path().absolute().parent

    generator.generate_sources(
        proto_dir=base_dir / 'protos',
        out_dir=base_dir / 'package',
    )

Features

  • Generates source files from Protocol Buffers.
  • Packages the generated sources for easy usage.
pip install iprotopy

Development

Installation

About

Automatic .proto to python dataclasses code generation

Topics

Resources

Stars

Watchers

Forks

Languages