Source

JRPC /

Filename Size Date modified Message
jrpc
682 B
382 B
283 B

Server

Here's a snippet for the server side of things:

from jrpc.server import serve

# the class whose methods we're going to expose
class Handler(object):
        def sum(self, a, b):
                return a + b

serve(9000, Handler())

Client

And here's a snippet for the client:

from jrpc.client import JRPCClient

c = JRPCClient('localhost', 9000)
sum = c.sum(1, 2)