A tornado RPC framework
Project description
A tornado RPC library.
This RPC framework uses tornado
so its very quick and asynchronous.
Example:
### example server code ###
from tornado import gen
from tornrpc.server import TornRPCServer
def test(arg):
return "You said %s" % arg
@gen.coroutine
def testasync(arg):
raise gen.Return("You said async %s" % arg)
server = TornRPCServer()
server.register(test)
server.register_async(testasync)
server.start(8080)
### example client code ###
from tornrpc.client import TornRPCClient
client = TornRPCClient('localhost:8080')
client.test('hi')
client.testasync('hi')
This RPC framework uses tornado
so its very quick and asynchronous.
Example:
### example server code ###
from tornado import gen
from tornrpc.server import TornRPCServer
def test(arg):
return "You said %s" % arg
@gen.coroutine
def testasync(arg):
raise gen.Return("You said async %s" % arg)
server = TornRPCServer()
server.register(test)
server.register_async(testasync)
server.start(8080)
### example client code ###
from tornrpc.client import TornRPCClient
client = TornRPCClient('localhost:8080')
client.test('hi')
client.testasync('hi')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TornRPC-1.0.1.tar.gz
(1.2 kB
view hashes)