Skip to content

lpichler/hello-grpc-client-py-relation-api

Repository files navigation

This is example of how to use gRPC client in python. Specific use case is to call basic requests of Relation API.

Repository contains generated gRPC client in python which could generated by command:

python -m grpc_tools.protoc -I<PATH_OF_REPO>third_party -I<PATH_OF_REPO>protos/  --python_out=.  --pyi_out=. --grpc_python_out=. <PATH_OF_REPO>protos/relationships.proto

Folder protos and third_party are taken from insights-rebac repository.

Instalation

virtualenv myenv
source myenv/bin/activate
pip install grpcio
pip install grpcio-tools
pip install googleapis-common-protos

Run

Run client and call requests CreateRelationshipsRequest and ReadRelationshipsRequest:

 python client.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages