Skip to main content

a python RPC library based on websocket

Project description

python implementation of jznet

## Install

pip install jznet

## Usage

>>> import pyjznet
>>> from pyjznet import Server
>>> class DemoService(object):
def sayHi(self, name, remote_service):
age = remote_service.call_rpc('demo', 'getAge')
except Exception as e:
return str(e)'got say hi request of %s who's age is %d' % (name, age))
return "Hi, %s who's age is %d!" % (name, age)
>>> server = Server()
>>> server.add_rpc_service('demo', DemoService())
>>> server.start()

call the service using jznet.js library

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jznet, version 0.0.2-alpha
Filename, size File type Python version Upload date Hashes
Filename, size jznet-0.0.2-alpha.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page