Sha256: e798944868da569b65815201d111bf3cef02b146ee6099f8440959e675479c08

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

from jsonrpc import ServiceProxy

client = ServiceProxy("http://127.0.0.1:8080/test_application")

# Get result of an existing method.
print 'Server timestamp is ' + str(client.server_timestamp())

# Get result of a non-existing method via method_missing.
print 'Method missing works: ' + client.plus(1)

# Synchronous error handling.
try:
  client.buggy_method()
except Exception, e:
  print 'EXCEPTION CAUGHT: ' + e.error['message']
  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sync_service-0.1.0 examples/python/client.py
sync_service-0.0.8 examples/python/client.py