Taras Galkovskyi
469631f549
|
5 years ago | |
---|---|---|
.. | ||
BUILD | fix formatting issues | 5 years ago |
README.cn.md | Fix: remove the space on the left of colons | 5 years ago |
README.en.md | fix the wrong word | 5 years ago |
alts_client.py | run yapf; delete alts unit tests | 5 years ago |
alts_server.py | run yapf; delete alts unit tests | 5 years ago |
client.py | Fix formatting | 5 years ago |
demo.proto | Fix: add copyright headers in `demo.proto` | 5 years ago |
demo_pb2.py | Fix: Cancel the modification of the package search path and Remove useless notes | 5 years ago |
demo_pb2_grpc.py | Fix: Cancel the modification of the package search path and Remove useless notes | 5 years ago |
server.py | Yapf all target python sources | 5 years ago |
README.en.md
Data transmission demo for using gRPC in Python
Four ways of data transmission when gRPC is used in Python. Official Guide
-
unary-unary
In a single call, the client can only send request once, and the server can only respond once.
client.py: simple_method
server.py: 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.
client.py: client_streaming_method
server.py: 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.
client.py: server_streaming_method
server.py: ServerStreamingMethod
-
stream-stream
In a single call, both client and server can send and receive data to each other multiple times.
client.py: bidirectional_streaming_method
server.py: BidirectionalStreamingMethod