In preparation for migrating it from python3.7 to python3.11. Pylint version had to be upgraded because pylint==2.2.2 doesn't support python 3.11. The image will be updated separately to remove compiling python3.7 from source in #40139. Pylint v2.17.7 docs: https://pylint.readthedocs.io/en/v2.17.7 Closes #40169 PiperOrigin-RevId: 783026287
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_methodserver.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_methodserver.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_methodserver.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_methodserver.py: BidirectionalStreamingMethod