GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - netsaj/python-protobuf-compiler: compile all protobuf files and create a single package distribution for can be installed with pip

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
protobuf_compiler
protobuf_compiler
 
 
protopy
protopy
 
 
test/subfolder
test/subfolder
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
protobuf-compiler.py
protobuf-compiler.py
 
 
protopy.py
protopy.py
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
test_protopy.py
test_protopy.py
 
 

Repository files navigation

python protobuf compiler

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

requirements

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

features

  • 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 )

install

pip3 install protobuf-compiler

for check install, execute in your terminal:

protopy -h

arguments

  • -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

usage

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

example

  • compile from git repository:

you can clone a git repository from gitlab and github

python3 -m protopy -o /my/target/dir -p testpackage -g https://github.com/netsaj/testing.git -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

example:

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

Authors

  • Fabio Moreno [email protected]

About

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

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.