imperiuse / regenerate-proto

Helpfully script for regerate proto file for Golang and Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build proto files python tool

Available lang:

  • Python
  • Golang

Before

Install grpc support software (install.sh):

# For Golang
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/protoc-gen-go
export PATH=$PATH:$GOPATH/bin

#For Python
python3 -m pip install --upgrade pip
python3 -m pip install grpcio
python3 -m pip install grpcio-tools

For more information see here -> https://grpc.io/docs/quickstart/

Usage:

echo "Generate Python *.pb"
python3 ./regenerate-proto.py --proto_dir ./api --python

echo "Generate Golang *.pb"
python3 ./regenerate-proto.py --proto_dir ./api --golang

About

Helpfully script for regerate proto file for Golang and Python


Languages

Language:Python 77.6%Language:Shell 22.4%