Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(7)  |  Derive(0)  |  Import(7)

src/b/r/bridge-python-HEAD/examples/client-context/server.py   bridge-python(Download)
from BridgePython import Bridge
bridge = Bridge(api_key='myapikey')
 
class PingHandler(object):
    def ping(self):

src/b/r/bridge-python-HEAD/examples/client-context/client.py   bridge-python(Download)
from BridgePython import Bridge
bridge = Bridge(api_key='myapikey')
 
class PongHandler(object):
    def pong(self):

src/b/r/bridge-python-HEAD/examples/chat/chatserver.py   bridge-python(Download)
from BridgePython import Bridge
 
class AuthHandler(object):
  def join(self, room, password, obj, callback):
    if password == "secret123":
      print ('Sorry!')
 
bridge = Bridge(api_key='myapikey')
bridge.publish_service('auth', AuthHandler())
 

src/b/r/bridge-python-HEAD/examples/chat/chatclient.py   bridge-python(Download)
from BridgePython import Bridge
 
bridge = Bridge(api_key='myapikey') # new code: using public key
 
class ChatHandler(object):

src/b/r/bridge-python-HEAD/examples/channels/server.py   bridge-python(Download)
from BridgePython import Bridge
bridge = Bridge(api_key='myapikey')
 
class AuthHandler(object):
 

src/b/r/bridge-python-HEAD/examples/channels/client.py   bridge-python(Download)
from BridgePython import Bridge
bridge = Bridge(api_key='myapikey')
 
class ChatHandler(object):
    def message(self, sender, message):

src/b/r/bridge-python-HEAD/examples/channels/client-writeable.py   bridge-python(Download)
from BridgePython import Bridge
bridge = Bridge(api_key='myapikey')
 
class ChatHandler(object):
    def message(self, sender, message):