Clean up example
This commit is contained in:
parent
72e2ef9071
commit
1f61e86cba
@ -56,7 +56,7 @@ from purerpc import Server
|
||||
|
||||
class Greeter(GreeterServicer):
|
||||
async def SayHello(self, message):
|
||||
return HelloReply(message="Hello, " + message.name)
|
||||
return HelloReply(message=f"Hello {message.name}")
|
||||
|
||||
async def SayHelloToMany(self, input_messages):
|
||||
async for message in input_messages:
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Greeter client."""
|
||||
|
||||
import anyio
|
||||
import purerpc
|
||||
|
||||
from greeter_grpc import GreeterStub
|
||||
from greeter_pb2 import HelloReply, HelloRequest
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
"""Greeter server."""
|
||||
from purerpc import Server
|
||||
|
||||
from greeter_grpc import GreeterServicer
|
||||
from greeter_pb2 import HelloReply, HelloRequest
|
||||
from purerpc import Server
|
||||
|
||||
|
||||
class Greeter(GreeterServicer):
|
||||
async def SayHello(self, message):
|
||||
return HelloReply(message="Hello, " + message.name)
|
||||
return HelloReply(message=f"Hello, {message.name}")
|
||||
|
||||
async def SayHelloToMany(self, input_messages):
|
||||
async for message in input_messages:
|
||||
|
Loading…
Reference in New Issue
Block a user