Skip to content

Instantly share code, notes, and snippets.

@mariotpc
Created October 8, 2018 05:48
Show Gist options
  • Save mariotpc/a1e8efa3cfa4a9c7ac20bc4dd144ad06 to your computer and use it in GitHub Desktop.
Save mariotpc/a1e8efa3cfa4a9c7ac20bc4dd144ad06 to your computer and use it in GitHub Desktop.
Nameko microservice RPC
from nameko.rpc import rpc
class FTHService:
name = "CelciusToFahrenheit"
@rpc
def convert (self, Celcius):
Fahrenheit = float(int(Celcius) * 1.8) + 32
return "Hello the Fahrenheit Temp is: , {}!".format(Fahrenheit)
class HiService:
name = "sayHi"
@rpc
def Hi (self, name):
return "Hello World, my Name is: {}!".format(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment