示例#1
0
文件: sources.py 项目: xguse/bokeh
 def from_blaze(self, remote_blaze_obj, local=True):
     from blaze.server import to_tree
     # only one Client object, can hold many datasets
     assert len(remote_blaze_obj._leaves()) == 1
     leaf = remote_blaze_obj._leaves()[0]
     blaze_client = leaf.data
     json_expr = to_tree(remote_blaze_obj, {leaf: ':leaf'})
     self.data_url = blaze_client.url + "/compute.json"
     self.local = local
     self.expr = json_expr
示例#2
0
 def from_blaze(self, remote_blaze_obj, local=True):
     from blaze.server import to_tree
     # only one Client object, can hold many datasets
     assert len(remote_blaze_obj._leaves()) == 1
     leaf = remote_blaze_obj._leaves()[0]
     blaze_client = leaf.data
     json_expr = to_tree(remote_blaze_obj, {leaf : ':leaf'})
     self.data_url = blaze_client.url + "/compute.json"
     self.local = local
     self.expr = json_expr