We only have unit tests at this point: - Testing how to use the async generator and read/write API, or both: https://github.com/grpc/grpc/blob/6a10e41db75bd6074bf01a08d260365e44922f04/src/python/grpcio_tests/tests_aio/unit/server_test.py#L164 - A slightly more complex test server with streaming method: https://github.com/grpc/grpc/blob/6a10e41db75bd6074bf01a08d260365e44922f04/src/python/grpcio_tests/tests_aio/unit/_test_server.py#L95
On Friday, February 11, 2022 at 2:37:10 PM UTC-8 Mark Bearden wrote: > Is there any available example of implementing the server side of an async > *bidirectional-streaming* service method, using grpc.aio? If I followed > the link to the unit test correctly, then it only shows a client for the > call that is in python. Looks like the code for the server side ( > *Grpc.Testing.TestService* class) is C#. > > On Wednesday, December 1, 2021 at 2:47:22 PM UTC-5 Lidi Zheng wrote: > >> Hi, >> >> Here is an unit test case using stream.write() and stream.read() to >> communicate in bidirectional streaming: >> https://github.com/grpc/grpc/blob/master/src/python/grpcio_tests/tests_aio/unit/channel_test.py#L180 >> >> Sorry that we didn't have an example to demonstrate this usage. >> >> On Tuesday, November 30, 2021 at 11:46:26 AM UTC-8 [email protected] >> wrote: >> >>> Hello, >>> I apologize in advance if it is a dumb question, but I was wondering how >>> can I do something like stream.write() or stream.read() in bidirectional >>> streaming in python where I want to asynchronously call these. >>> >>> The official gRPC Python AsyncIO API documentation only has abstract >>> methods in the classes. Does this mean that I actually have to (override) >>> implement the methods myself? How do I actually get the context to >>> correctly configure a class like grpc.aio.StreamStreamCall() ? (Apologies >>> again if it is a dumb question, I'm a beginner to this and development in >>> general) >>> >>> I referred to these sources but couldn't find a direct answer- >>> https://grpc.github.io/grpc/python/grpc_asyncio.html#overview >>> https://github.com/grpc/grpc.io/issues/726#issuecomment-806234300 >>> >>> https://stackoverflow.com/questions/67465629/grpc-python-server-to-client-communication-through-function-call >>> >>> https://pretagteam.com/question/how-do-i-handle-streaming-messages-with-python-grpc >>> https://grpclib.readthedocs.io/en/latest/client.html >>> >> -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/a25c97b2-4242-4f55-bc63-33fcca8b60dfn%40googlegroups.com.
