grpclib:用于异步的纯Python gRPC实现

时间:2021-04-29 21:47:09
【文件属性】:
文件名称:grpclib:用于异步的纯Python gRPC实现
文件大小:164KB
文件格式:ZIP
更新时间:2021-04-29 21:47:09
python microservices protobuf grpc asyncio 用于异步的纯Python gRPC实现 该项目基于并且需要Python> = 3.6 。 有关所有可用示例,请参见项目存储库中的示例目录。 客户 import asyncio from grpclib . client import Channel # generated by protoc from . helloworld_pb2 import HelloRequest , HelloReply from . helloworld_grpc import GreeterStub async def main (): async with Channel ( '127.0.0.1' , 50051 ) as channel : greeter = GreeterStub ( channel ) reply = await greeter . S

网友评论