Clean up example
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Luke Murphy 2020-08-09 03:53:39 +02:00
parent 72e2ef9071
commit 1f61e86cba
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -1,7 +1,7 @@
"""Greeter client."""
import anyio
import purerpc
from greeter_grpc import GreeterStub
from greeter_pb2 import HelloReply, HelloRequest

View File

@ -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: