1️⃣ The gRPC framework allows you to directly call the methods of a remote application as if they were local methods.
2️⃣ You can send requests directly from the client to the server.
3️⃣ You can create distributed applications more easily.
First, install prerequisites with
$ python -m pip install grpcio
$ python -m pip install grpcio-tools
💡 When you write a .proto file and compile it, server skeleton and client stub are automatically generated.
You can check a newly generated protocol buffer file.
python -m grpc_tools.protoc -I. —python_out=. —grpc_python_out=. ./calculator.proto
python3 CalculatorServer.py
python3 CalculatorClient.py