本文整理汇总了Python中pyjamas.JSONService.JSONProxy类的典型用法代码示例。如果您正苦于以下问题:Python JSONProxy类的具体用法?Python JSONProxy怎么用?Python JSONProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JSONProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
if DEBUG == True :
services = 'services/'
else:
services = self.ROOT_URL
JSONProxy.__init__(self, services,
DataService.methods)
示例2: __init__
def __init__(self, server="mod_python"):
methods = ["echo", "reverse", "uppercase", "lowercase", "nonexistant"]
if server == "mod_python":
JSONProxy.__init__(self, "services/EchoService.py", methods)
elif server == "flask":
JSONProxy.__init__(
self, "http://localhost:5000/json_echo/", methods)
示例3: __init__
def __init__(self):
JSONProxy.__init__(self, '/admin/tickery',
['getQueueWidth', 'setQueueWidth', 'queueSize', 'queuePaused',
'pause', 'resume', 'getQueued', 'getUnderway',
'setMaxRequestsLimit', 'getMaxRequestsLimit',
'setFriendsLimit', 'getFriendsLimit',
'setResultsLimit', 'getResultsLimit', 'directAddUser',
'bulkAddUsers', 'cancel'])
示例4: __init__
def __init__(self):
JSONProxy.__init__(self, "/JSON",
["login",
"logout", "get_doc_types",
"get_schema_version",
"get_documents",
"get_provider_inbox_data",
"get_patient_messages",
"doSomething",
"search_patient"])
示例5: __init__
def __init__(self):
# Since this is a singleton, throw an exception if the constructor is called
# explicitly.
if GlibRPCService._onlyInstance!=None :
raise Exception( "GlibRPCService is a singleton class. Call 'GlibRPCService.instance()' to get the only running instance" )
JSONProxy.__init__(self, "services/GlibControlProxy.py", ["getStates","connectedCBCNames",
"I2CRegisterValues","setI2CRegisterValues","saveI2cRegisterValues","loadI2cRegisterValues",
"startProcesses","killProcesses","boardIsReachable",
"stopTakingData","startSCurveRun","startOccupancyCheck","startTrimCalibration",
"getDataTakingStatus","getOccupancies","createHistogram","saveHistograms"] )
示例6: onModuleLoad
def onModuleLoad(self):
self.TEXT_WAITING = "Waiting for response..."
self.TEXT_ERROR = "Server Error"
self.remote = JSONProxy("../api", ["hello"])
self.status = Label()
self.text_box = TextBox()
self.button_send = Button("Send", self)
buttons = HorizontalPanel()
buttons.add(self.button_send)
buttons.setSpacing(8)
info = """<h2>JSON-RPC Example</h2>
<p>This example demonstrates the calling of server services with
<a href="http://json-rpc.org/">JSON-RPC</a>.
</p>
<p>Enter your name below.</p>"""
panel = VerticalPanel()
panel.add(HTML(info))
panel.add(self.text_box)
#panel.add(method_panel)
panel.add(buttons)
panel.add(self.status)
RootPanel().add(panel)
示例7: __init__
def __init__(self, server="mod_python", flask_view_type="function"):
methods = ["echo", "reverse", "uppercase", "lowercase", "nonexistant"]
if server == "mod_python":
JSONProxy.__init__(self, "services/EchoService.py", methods)
elif server == "flask":
if(flask_view_type == "function"):
JSONProxy.__init__(
self, "http://localhost:5000/json_echo/", methods)
elif(flask_view_type == "class"):
JSONProxy.__init__(
self, "http://localhost:5000/json_echo_class", methods)
elif(flask_view_type == "celery"):
methods.append("get_result")
JSONProxy.__init__(
self, "http://localhost:5000/json_celery_class", methods)
示例8: __init__
def __init__(self):
JSONProxy.__init__(self, 'services/', DataService.methods, {'X-CSRFToken': getCookie('csrftoken')})
示例9: __init__
def __init__(self):
JSONProxy.__init__(self, "/services/pages/",
["getPage", "updatePage",
"getPages", "addPage",
"getPageByName",
"deletePage"])
示例10: __init__
def __init__(self):
""" Constructs a new RegionNamesServicePython instance.
"""
JSONProxy.__init__(self, "/json", ["get_geographical_region_names"])
示例11: __init__
def __init__(self):
JSONProxy.__init__(self, "/echo",
["echo", "reverse", "uppercase", "lowercase", "nonexistant"])
示例12: __init__
def __init__(self):
JSONProxy.__init__(self, "/RPC2", SchoolbellRPC.methods)
示例13: __init__
def __init__( self ):
JSONProxy.__init__( self, "/services/mapservices", ["usernames", "points", "pointinfo", 'shakeevents'] )
示例14: __init__
def __init__(self):
JSONProxy.__init__(self, "/maps/default/call/jsonrpc", ["getPoints"])
示例15: __init__
def __init__(self):
JSONProxy.__init__(self, 'services/', DataService.methods)