def get(id, destination): """Get details of data""" api = rest.DataApi(configuration.get_api_client()) if destination is None: result = api.get_data(id) pprint.pp_dict(util.to_dict(result)) else: with util.release_conn(api.get_data(id, _preload_content=False)) as result: logging.info('open %s', destination) with open(destination, 'wb') as f: logging.info('begin io %s', destination) f.write(result.data) logging.info('end io %s', destination) print('save', id, 'as', destination)
def get(id): """Get details of training""" api = rest.TrainingApi(configuration.get_api_client()) result = api.get_training(id) pprint.pp_dict(util.to_dict(result))
def get(id): """Get details of inference""" api = rest.InferenceApi(configuration.get_api_client()) result = api.get_inference(id) pprint.pp_dict(util.to_dict(result))
def delete(id): """Delete a tenant""" api = rest.TenantApi(configuration.get_api_client()) result = api.delete_tenant(id) print('deleted', id) pprint.pp_dict(util.to_dict(result))
def get(id): """Get details of a tenant""" api = rest.TenantApi(configuration.get_api_client()) result = api.get_tenant(id) pprint.pp_dict(util.to_dict(result))
def get(id): """Get details of data""" api = rest.DataApi(configuration.get_api_client()) result = api.get_data(id) pprint.pp_dict(util.to_dict(result))