grpc/examples/python/data_transmission
Yash Tibrewal 41ec08c69a
Update third_party/protobuf to 3.21.4 (#30377)
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* regenerate protos for ruby, php

* update build_handwritten.yaml

* regenerate projects

* Build - Use :well_known_type_protos instead of :well_known_protos

* Fix target

* Update upb

* Update Python for Protobuf 4.21 (#140)

* Update protobuf dependency on grpcio-tools

* Off by one

* Drop python 3.6 support

* Try upgrading pip

* And in the other script

* Try to figure out if we're compatible with abi3

* See what we've already got installed

* Update the requirements.txt file I didn't know existed

* And here too

* See what's installed

* Let's try that again

* Remove

* Try to confirm version

* Let me see the generated code

* Fix non-Bazel test runner

* Work for all test directories

* Regenerate example protos

* Clean up

* Generate .pyi files

* Fix type checking and linting

* Exclude pyi files from isort

* Upgrade to 3.21.4

* Update iwyu to get around messy protobuf IWYU rules

Co-authored-by: Richard Belleville <gnossen@gmail.com>
2022-08-04 09:39:49 -07:00
..
BUILD Make Buildifier Sanity Test Strict (#27807) 2021-11-03 14:57:04 -07:00
README.cn.md Fix: remove the space on the left of colons 2019-09-17 09:37:56 +08:00
README.en.md fix the wrong word 2019-10-01 05:13:33 +08:00
alts_client.py Introduce Python import sorting to our sanity test suite (#26768) 2021-07-26 12:31:21 -07:00
alts_server.py Fix the pylint complain 2020-04-30 15:16:32 -07:00
client.py Introduce Python import sorting to our sanity test suite (#26768) 2021-07-26 12:31:21 -07:00
demo.proto Fix: add copyright headers in `demo.proto` 2019-09-11 10:23:31 +08:00
demo_pb2.py Update third_party/protobuf to 3.21.4 (#30377) 2022-08-04 09:39:49 -07:00
demo_pb2.pyi Update third_party/protobuf to 3.21.4 (#30377) 2022-08-04 09:39:49 -07:00
demo_pb2_grpc.py Update third_party/protobuf to 3.21.4 (#30377) 2022-08-04 09:39:49 -07:00
server.py Introduce Python import sorting to our sanity test suite (#26768) 2021-07-26 12:31:21 -07:00

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