⚠️ This repository has been archived.It was a small showcase demonstrating how to generate Python gRPC clients from the enthus API protobuf definitions (internally known as Stargate).
For the API definitions themselves — and up-to-date usage — please see enthus-appdev/enthus-apis.
The original setup instructions are preserved below for reference. Note that the referenced GitLab URLs and workflow are outdated.
$ git clone git@gitlab.com:mclgmbh/grpc-python.git
$ cd grpc-python
$ python -m pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ python -m pip install --upgrade pip$ python -m pip install grpcio$ cd ..
$ git clone git@gitlab.com:mclgmbh/enthus-apis.gitDiese Schritte müssen für jede neue Version von Stargate wiederholt werden, aber nur wenn die neue Version auch explizit genutzt werden soll. Stargate ist immer rückwärtskompatibel, auch ohne Update.
$ cd enthus-apis
$ git pull
$ buf generate"stargate" und "buf" aus dem "gen/python" folder in das Python-script-Verzeichnis kopieren
evtl file anlegen in buf folder (python import fail)
$ python grpc_example.py