def send_broadcast(namespace, type, payload):
 frame = {'type': type, 'payload': payload}
 amqp.add_item(routing_key=namespace, body=json.dumps(frame), exchange=_WEBSOCKET_EXCHANGE)

def send_broadcast ( namespace , type , payload ) : frame = { 'type' : type , 'payload' : payload } amqp . add_item ( routing_key = namespace , body = json . dumps ( frame ) , exchange = _WEBSOCKET_EXCHANGE )
broadcast an object to all websocket listeners in a namespace .