|  Masood Malekghassemi
				
				77ebadc662
				Add grace=0 to server stop in Python example | 10 年 前 | |
|---|---|---|
| .. | ||
| helloworld | 10 年 前 | |
| route_guide | 10 年 前 | |
| README.md | 10 年 前 | |
For this sample, we've already generated the server and client stubs from helloworld.proto and we'll be using a specific reference platform.
root accessgitpython2.7pip  $ # install the gRPC Core:
  $ sudo apt-get install libgrpc-dev
  $ # install gRPC Python:
  $ sudo pip install -U grpcio==0.11.0b1
  $ # Since this "hello, world" example uses protocol buffers:
  $ sudo pip install -U protobuf==3.0.0a3
  $ # Clone the repository to get the example code:
  $ git clone https://github.com/grpc/grpc
  $ # Navigate to the "hello, world" Python example:
  $ cd grpc/examples/python/helloworld
Run the server
$ python2.7 greeter_server.py &
Run the client
$ python2.7 greeter_client.py
You can find a more detailed tutorial in gRPC Basics: Python