mirror of https://github.com/grpc/grpc.git
Merge pull request #7848 from nicolasnoble/upmerge-from-v1.0.x
Manual upmerge from v1.0.xpull/7993/head
commit
74c92f62d9
33 changed files with 108 additions and 150 deletions
@ -1,56 +1 @@ |
||||
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: |
||||
```sh |
||||
$ pip install grpcio |
||||
``` |
||||
Or, to install it system wide: |
||||
```sh |
||||
$ sudo pip install grpcio |
||||
``` |
||||
|
||||
If you're on Windows, make sure you installed the `pip.exe` component when you |
||||
installed Python. Invoke as above but with `pip.exe` instead of `pip` (you may |
||||
also need to invoke from a `cmd.exe` ran as administrator): |
||||
```sh |
||||
$ pip.exe install grpcio |
||||
``` |
||||
|
||||
Download the example |
||||
```sh |
||||
$ # 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 |
||||
|
||||
```sh |
||||
$ python2.7 greeter_server.py & |
||||
``` |
||||
|
||||
- Run the client |
||||
|
||||
```sh |
||||
$ python2.7 greeter_client.py |
||||
``` |
||||
|
||||
Tutorial |
||||
-------- |
||||
|
||||
You can find a more detailed tutorial in [gRPC Basics: Python][] |
||||
|
||||
[helloworld.proto]:../protos/helloworld.proto |
||||
[Install gRPC Python]:../../src/python#installation |
||||
[gRPC Basics: Python]:http://www.grpc.io/docs/tutorials/basic/python.html |
||||
[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html) |
||||
|
@ -1 +1 @@ |
||||
[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs) |
||||
[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html) |
||||
|
@ -1 +1,3 @@ |
||||
An example showing two stubs sharing a channel and two servicers sharing a server. |
||||
|
||||
More complete documentation lives at [grpc.io](http://www.grpc.io/docs/tutorials/basic/python.html). |
||||
|
Loading…
Reference in new issue