https://github.com/takp/grpc-sample
Sample code for gRPC with Python
https://github.com/takp/grpc-sample
Last synced: 3 months ago
JSON representation
Sample code for gRPC with Python
- Host: GitHub
- URL: https://github.com/takp/grpc-sample
- Owner: takp
- Created: 2018-11-01T04:44:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T02:24:37.000Z (over 6 years ago)
- Last Synced: 2024-12-27T09:27:57.505Z (5 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grpc-sample
This is sample code of gRPC in Python.
- Necessary packages
```bash
$ python -m pip install grpcio grpcio-tools googleapis-common-protos
```- Compile `.proto`
```bash
$ python -m grpc_tools.protoc -I./protos --python_out=. --grpc_python_out=. ./protos/helloworld.proto
```## Run
- Run server
```bash
$ py greeter_server.py
```- Run client (at another terminal)
```bash
$ py greeter_client.py
Greeter client received: Hello, you!
```