From d5810a155b5a58688067c0f9aaf6bb32d0fab4a7 Mon Sep 17 00:00:00 2001 From: kerbalwzy Date: Tue, 27 Aug 2019 11:14:36 +0800 Subject: [PATCH] Fix: rebuild README files --- .../python/data_transmission/README.cn.md | 36 +++++++++++++++++++ .../python/data_transmission/README.en.md | 36 +++++++++++++++++++ examples/python/data_transmission/README.md | 28 --------------- 3 files changed, 72 insertions(+), 28 deletions(-) create mode 100644 examples/python/data_transmission/README.cn.md create mode 100644 examples/python/data_transmission/README.en.md delete mode 100644 examples/python/data_transmission/README.md diff --git a/examples/python/data_transmission/README.cn.md b/examples/python/data_transmission/README.cn.md new file mode 100644 index 00000000000..500e9bf95de --- /dev/null +++ b/examples/python/data_transmission/README.cn.md @@ -0,0 +1,36 @@ +## Data transmission demo for using gRPC in Python + +在Python中使用gRPC时, 进行数据传输的四种方式。 + +- #### 简单模式 + + 没啥好说的,跟调普通方法没差 + + `client.py - line:13 - simple_method` + + `server.py - line:17 - SimpleMethod` + +- #### 客户端流模式 + + 在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应. + + `clien.py - line:24 - client_streaming_method ` + + `server.py - line:25 - ClientStreamingMethod` + +- #### 服务端流模式 + + 在一次调用中, 客户端只能一次向服务器传输数据, 但是服务器可以多次返回响应 + + `clien.py - line:42 - server_streaming_method` + + `server.py - line:35 - ServerStreamingMethod` + +- #### 双向流模式 + + 在一次调用中, 客户端和服务器都可以向对方多次收发数据 + + `client.py - line:55 - bidirectional_streaming_method` + + `server.py - line:51 - BidirectionalStreamingMethod` + diff --git a/examples/python/data_transmission/README.en.md b/examples/python/data_transmission/README.en.md new file mode 100644 index 00000000000..7fc527cf51a --- /dev/null +++ b/examples/python/data_transmission/README.en.md @@ -0,0 +1,36 @@ +## Data transmission demo for using gRPC in Python + +Four ways of data transmission when gRPC is used in Python. + +- #### unary-unary + + There's nothing to say. It's no different from the usual way. + + `client.py - line:13 - simple_method` + + `server.py - line:17 - SimpleMethod` +- #### stream-unary + + In a single call, the client can transfer data to the server an arbitrary number of times, but the server can only return a response once. + + `clien.py - line:24 - client_streaming_method` + + `server.py - line:25 - ClientStreamingMethod` + +- #### unary-stream + + In a single call, the client can only transmit data to the server at one time, but the server can return the response many times. + + `clien.py - line:42 - server_streaming_method` + + `server.py - line:35 - ServerStreamingMethod` + +- #### stream-stream + + In a single call, both client and server can send and receive data + to each other multiple times. + + `client.py - line:55 - bidirectional_streaming_method` + + `server.py - line:51 - BidirectionalStreamingMethod` + diff --git a/examples/python/data_transmission/README.md b/examples/python/data_transmission/README.md deleted file mode 100644 index 919b9c5cc61..00000000000 --- a/examples/python/data_transmission/README.md +++ /dev/null @@ -1,28 +0,0 @@ -## Demo for using gRPC in Python - -在Python中使用gRPC时, 进行数据传输的四种方式。(Four ways of data transmission when gRPC is used in Python.) - -- #### 简单模式 (unary-unary) -```text -没啥好说的,跟调普通方法没差 -There's nothing to say. It's no different from the usual way. -``` -- #### 客户端流模式 (stream-unary) -```text -在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应. -In a single call, the client can transfer data to the server several times, -but the server can only return a response once. -``` -- #### 服务端流模式 (unary-stream) -```text -在一次调用中, 客户端只能一次向服务器传输数据, 但是服务器可以多次返回响应 -In a single call, the client can only transmit data to the server at one time, -but the server can return the response many times. -``` -- #### 双向流模式 (stream-stream) -```text -在一次调用中, 客户端和服务器都可以向对方多次收发数据 -In a single call, both client and server can send and receive data -to each other multiple times. -``` -