@dispatch(Expr, Client)
def compute_down(expr, ec, profiler_output=None, compute_kwargs=None, odo_kwargs=None, **kwargs):
 from .server import to_tree
 kwargs = keymap(u8, kwargs)
 tree = to_tree(expr)
 serial = ec.serial
 if (profiler_output is not None):
  kwargs[u'profile'] = True
  kwargs[u'profiler_output'] = ':response'
 kwargs[u'compute_kwargs'] = keymap(u8, (compute_kwargs or {}))
 kwargs[u'odo_kwargs'] = keymap(u8, (odo_kwargs or {}))
 r = post(ec, '/compute', data=serial.dumps(assoc(kwargs, u'expr', tree)), auth=ec.auth, headers=mimetype(serial))
 if (not ok(r)):
  raise ValueError(('Bad response: %s' % reason(r)))
 response = serial.loads(content(r))
 if (profiler_output is not None):
  profiler_output.write(response[u'profiler_output'])
 return serial.data_loads(response[u'data'])

@ dispatch ( Expr , Client ) def compute_down ( expr , ec , profiler_output = None , compute_kwargs = None , odo_kwargs = None , ** kwargs ) : from . server import to_tree kwargs = keymap ( u8 , kwargs ) tree = to_tree ( expr ) serial = ec . serial if ( profiler_output is not None ) : kwargs [ u'profile' ] = True kwargs [ u'profiler_output' ] = ':response' kwargs [ u'compute_kwargs' ] = keymap ( u8 , ( compute_kwargs or { } ) ) kwargs [ u'odo_kwargs' ] = keymap ( u8 , ( odo_kwargs or { } ) ) r = post ( ec , '/compute' , data = serial . dumps ( assoc ( kwargs , u'expr' , tree ) ) , auth = ec . auth , headers = mimetype ( serial ) ) if ( not ok ( r ) ) : raise ValueError ( ( 'Bad response: %s' % reason ( r ) ) ) response = serial . loads ( content ( r ) ) if ( profiler_output is not None ) : profiler_output . write ( response [ u'profiler_output' ] ) return serial . data_loads ( response [ u'data' ] )
compute down for blaze clients .