The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
kerbalwzy 1859799ee3 Fix: update README because code reformat by YAPF script 5 years ago
..
README.cn.md Fix: update README because code reformat by YAPF script 5 years ago
README.en.md Fix: update README because code reformat by YAPF script 5 years ago
client.py Fix: reformat code with YAPF script, and check with PyLint 5 years ago
demo.proto Update: add proto3 document link, change chinese translation and comment of 'unary' 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 Fix: reformat code with YAPF script, and check with PyLint 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. Offical Guide

  • unary-unary

    In a single call, the client can only send request once, and the server can only respond once.

    client.py - line:14 - 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:27 - client_streaming_method

    server.py - line:28 - 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:48 - server_streaming_method

    server.py - line:41 - ServerStreamingMethod

  • stream-stream

    In a single call, both client and server can send and receive data to each other multiple times.

    client.py - line:63 - bidirectional_streaming_method

    server.py - line:59 - BidirectionalStreamingMethod