aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/python
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2015-08-27 14:38:38 -0700
committerGravatar Stanley Cheung <stanleycheung@google.com>2015-08-27 14:38:38 -0700
commit0a268216c2c8e112351b7ed038da04bf50b9eb5a (patch)
treeab93176dac0836e46df5f2b6f54c5a4fba66c823 /examples/python
parent20fa6693f3836bf1418176ec78b26feaf51a369d (diff)
replace all grpc-common occurances with examples
Diffstat (limited to 'examples/python')
-rw-r--r--examples/python/helloworld/README.md16
-rw-r--r--examples/python/route_guide/README.md18
2 files changed, 17 insertions, 17 deletions
diff --git a/examples/python/helloworld/README.md b/examples/python/helloworld/README.md
index 0a6a718bae..d199c401ec 100644
--- a/examples/python/helloworld/README.md
+++ b/examples/python/helloworld/README.md
@@ -1,6 +1,6 @@
# gRPC Python Hello World
-This is a quick introduction with a simple example and installation instructions: for a more complete tutorial see [gRPC Basics: Python](https://github.com/grpc/grpc-common/tree/master/python/route_guide).
+This is a quick introduction with a simple example and installation instructions: for a more complete tutorial see [gRPC Basics: Python](examples/python/route_guide).
### Install gRPC
Make sure you have built gRPC Python from source on your system. Follow the instructions here:
@@ -12,19 +12,19 @@ have cloned the [gRPC git repo](https://github.com/grpc/grpc).
### Get the source code
-The example code for our Hello World and our other examples live in the `grpc-common`
-GitHub repository. Clone this repository to your local machine by running the
+The example code for our Hello World and our other examples live in the `examples`
+directory. Clone this repository to your local machine by running the
following command:
```sh
-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
```
-Change your current directory to grpc-common/python/helloworld
+Change your current directory to examples/python/helloworld
```sh
-$ cd grpc-common/python/helloworld/
+$ cd examples/python/helloworld/
```
### Defining a service
@@ -96,7 +96,7 @@ been generated for you (helloworld_pb2.py).
### The client
-Client-side code can be found in [greeter_client.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_client.py).
+Client-side code can be found in [greeter_client.py](examples/python/helloworld/greeter_client.py).
You can run the client using:
@@ -107,7 +107,7 @@ $ ./run_client.sh
### The server
-Server side code can be found in [greeter_server.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_server.py).
+Server side code can be found in [greeter_server.py](examples/python/helloworld/greeter_server.py).
You can run the server using:
diff --git a/examples/python/route_guide/README.md b/examples/python/route_guide/README.md
index 91bef0ac00..dc97892ea5 100644
--- a/examples/python/route_guide/README.md
+++ b/examples/python/route_guide/README.md
@@ -6,7 +6,7 @@ This tutorial provides a basic Python programmer's introduction to working with
- Generate server and client code using the protocol buffer compiler.
- Use the Python gRPC API to write a simple client and server for your service.
-It assumes that you have read the [Getting started](https://github.com/grpc/grpc-common) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository.
+It assumes that you have read the [Getting started](https://github.com/grpc/grpc/tree/master/examples) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository.
This isn't a comprehensive guide to using gRPC in Python: more reference documentation is coming soon.
@@ -19,21 +19,21 @@ With gRPC you can define your service once in a .proto file and implement client
## Example code and setup
-The example code for this tutorial is in [grpc/grpc-common/python/route_guide](https://github.com/grpc/grpc-common/tree/master/python/route_guide). To download the example, clone the `grpc-common` repository by running the following command:
+The example code for this tutorial is in [examples/python/route_guide](examples/python/route_guide). To download the example, clone this repository by running the following command:
```shell
-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
```
-Then change your current directory to `grpc-common/python/route_guide`:
+Then change your current directory to `examples/python/route_guide`:
```shell
-$ cd grpc-common/python/route_guide
+$ cd examples/python/route_guide
```
-You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Python quick start guide](https://github.com/grpc/grpc-common/tree/master/python).
+You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Python quick start guide](examples/python).
## Defining the service
-Your first step (as you'll know from [Getting started](https://github.com/grpc/grpc-common)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto).
+Your first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -115,7 +115,7 @@ Creating and running a `RouteGuide` server breaks down into two work items:
- Implementing the servicer interface generated from our service definition with functions that perform the actual "work" of the service.
- Running a gRPC server to listen for requests from clients and transmit responses.
-You can find the example `RouteGuide` server in [grpc-common/python/route_guide/route_guide_server.py](https://github.com/grpc/grpc-common/blob/master/python/route_guide/route_guide_server.py).
+You can find the example `RouteGuide` server in [examples/python/route_guide/route_guide_server.py](examples/python/route_guide/route_guide_server.py).
### Implementing RouteGuide
@@ -222,7 +222,7 @@ Because `start()` does not block you may need to sleep-loop if there is nothing
<a name="client"></a>
## Creating the client
-You can see the complete example client code in [grpc-common/python/route_guide/route_guide_client.py](https://github.com/grpc/grpc-common/blob/master/python/route_guide/route_guide_client.py).
+You can see the complete example client code in [examples/python/route_guide/route_guide_client.py](examples/python/route_guide/route_guide_client.py).
### Creating a stub