Skip to main content

a python RPC library based on websocket

Project description

pyjznet
====
python implementation of jznet


## Install

pip install jznet

## Usage

>>> import pyjznet
>>> from pyjznet import Server
>>> class DemoService(object):
def sayHi(self, name, remote_service):
try:
age = remote_service.call_rpc('demo', 'getAge')
except Exception as e:
logging.error(e)
return str(e)
logging.info('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.

Source Distribution

jznet-0.0.2-alpha.tar.gz (7.3 kB view details)

Uploaded Source

File details

Details for the file jznet-0.0.2-alpha.tar.gz.

File metadata

  • Download URL: jznet-0.0.2-alpha.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jznet-0.0.2-alpha.tar.gz
Algorithm Hash digest
SHA256 7128c71fc6b5ad55ea62ffb055fe4e790cffdc397615a9ad66a491be21fc82c0
MD5 add53cb42cb052844646b3638a215a88
BLAKE2b-256 76598a36284df40d9ed800169df6a473440dd9ec5669d8ff93b25b0e00fb56d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page