Skip to main content

compile all protobuf files and create a single package distribution for can be installed with pip

Project description

python protobuf compiler

compile all protobuf files and create a single package distribution for can be installed with pip


  • python >= 3.6
  • git (only for build from git repository)


  • support for multiples folders
  • support multiples proto files
  • Create self package for pip
  • Support for build from github and gitlab repository
  • Support for build from local directory
  • support imports into proto file (see test folder for show example )


pip3 install protobuf-compiler

for check install, execute in your terminal:

protopy -h


  • -h, --help : show this help message and exit
  • -d PROTO_DIR, --dir PROTO_DIR : folder path where the .proto files are located
  • -p PACKAGE_NAME, --package PACKAGE_NAME : package name
  • -o OUTPUT_DIR, --output OUTPUT_DIR: output folder for save single package .tar.gz
  • -g URL, --git URL : git reopsitory url where the .proto files are located
  • -t TOKEN, --token TOKEN : git server api token
  • -v VERSION, --version VERSION : tag version for build package


protopy [-h] [-d PROTO_DIR] [-p PACKAGE_NAME] [-o OUTPUT_DIR]


  • compile from git repository:

you can clone a git repository from gitlab and github

python3 -m protopy -o /my/target/dir -p testpackage -g -t my-private-token
  • compile from folder:
python3 -m protopy -o /my/output/dir -p testpackage -d /my/protofile/source/dir 

install generate package in your app

run in your app folder:

pip3 install /my/output/dir/package-version.tar.gz


  • installing generate package:
pip3 install /Users/netsaj/temp/mytest-1.0.0.tar.gz
  • import into you .py files:
from import analytics_pb2


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

protobuf_compiler-1.0.20.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

protobuf_compiler-1.0.20-py3-none-any.whl (8.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page