This repo is to be used to generate the required code to use in the emb3rs project, for gRPC communication.
Create Conda environment and install packages:
conda env create -n grpc-module -f environment-py39.yml
conda activate grpc-module
Create Conda environment and install packages:
conda run python -m grpc_tools.protoc -Iprotos/ \
--python_out=plibs \
--grpc_python_out=plibs \
protos/<module>/<module>.proto
Requirements:
- protoc
- protobuf
- protoc_php_plugin
if still not enough, check at the links below for more information.
- "https://github.com/grpc/grpc/blob/v1.45.0/src/php/README.md"
- "https://grpc.io/docs/languages/php/quickstart/"
- zsh or bash script (zsh example)
. generate_php.sh protos/manager/manager.proto
Server test:
PYTHONPATH=$PYTHONPATH:plibs python test_server.py
Client test:
PYTHONPATH=$PYTHONPATH:plibs python test_client.py