tree: 075c946dcd908714875fec6486c9845713bf3f16 [path history] [tgz]
  1. helloworld/
  2. route_guide/
  3. README.md
examples/python/README.md

gRPC in 3 minutes (Python)

Background

For this sample, we've already generated the server and client stubs from helloworld.proto and we'll be using a specific reference platform.

Install gRPC:

$ pip install grpcio

Or, to install it system wide:

	$ sudo pip install grpcio

Download the example

  $ # 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

Try it!

  • Run the server

    $ python2.7 greeter_server.py &
    
  • Run the client

    $ python2.7 greeter_client.py
    

Tutorial

You can find a more detailed tutorial in gRPC Basics: Python