slycat.web.server.handlers

slycat.web.server.handlers.css_bundle()[source]
slycat.web.server.handlers.delete_job(hostname, jid)[source]
slycat.web.server.handlers.delete_model(mid)[source]
slycat.web.server.handlers.delete_project(pid)[source]
slycat.web.server.handlers.delete_project_cache(pid)[source]

clears all the cached images and videos for a project given a project ID :param pid: Project ID :return: status

slycat.web.server.handlers.delete_project_cache_object(pid, key)[source]
slycat.web.server.handlers.delete_reference(rid)[source]
slycat.web.server.handlers.delete_remote(sid)[source]
slycat.web.server.handlers.delete_upload(uid)[source]
slycat.web.server.handlers.get_bookmark(bid)[source]
slycat.web.server.handlers.get_checkjob(hostname, jid)[source]
slycat.web.server.handlers.get_configuration_markings()[source]
slycat.web.server.handlers.get_configuration_parsers()[source]
slycat.web.server.handlers.get_configuration_remote_hosts()[source]
slycat.web.server.handlers.get_configuration_support_email()[source]
slycat.web.server.handlers.get_configuration_version()[source]
slycat.web.server.handlers.get_configuration_wizards()[source]
slycat.web.server.handlers.get_global_resource(resource)[source]
slycat.web.server.handlers.get_job_output(hostname, jid, path)[source]
slycat.web.server.handlers.get_model(mid, **kwargs)[source]
slycat.web.server.handlers.get_model_array_attribute_chunk(mid, aid, array, attribute, **arguments)[source]
slycat.web.server.handlers.get_model_arrayset_data(mid, aid, hyperchunks, byteorder=None)[source]
slycat.web.server.handlers.get_model_arrayset_metadata(mid, aid, **kwargs)[source]
slycat.web.server.handlers.get_model_file(mid, aid)[source]
slycat.web.server.handlers.get_model_parameter(mid, aid)[source]
slycat.web.server.handlers.get_model_statistics(mid)[source]

returns statistics on the model :param mid: model ID :return json: {

“mid”:mid, “hdf5_file_size”:hdf5_file_size, “total_server_data_size”: total_server_data_size, “hdf5_store_size”:total_hdf5_server_size, “model”:model, “delta_creation_time”:delta_creation_time, “couchdb_doc_size”: sys.getsizeof(model)

}

slycat.web.server.handlers.get_model_table_chunk(mid, aid, array, rows=None, columns=None, index=None, sort=None)[source]
slycat.web.server.handlers.get_model_table_metadata(mid, aid, array, index=None)[source]
slycat.web.server.handlers.get_model_table_sorted_indices(mid, aid, array, rows=None, index=None, sort=None, byteorder=None)[source]
slycat.web.server.handlers.get_model_table_unsorted_indices(mid, aid, array, rows=None, index=None, sort=None, byteorder=None)[source]
slycat.web.server.handlers.get_page(ptype)[source]
slycat.web.server.handlers.get_page_resource(ptype, resource)[source]
slycat.web.server.handlers.get_project(pid)[source]

returns a project based on “content-type” header :param pid: project ID :return: Either html landing page of given project or the json representation of the project

slycat.web.server.handlers.get_project_cache_object(pid, key)[source]
slycat.web.server.handlers.get_project_models(pid)[source]
slycat.web.server.handlers.get_project_references(pid)[source]
slycat.web.server.handlers.get_projects(_=None)[source]
slycat.web.server.handlers.get_remote_file(hostname, path, **kwargs)[source]

Given a hostname and file path returns the file given by the path :param hostname: connection host name :param path: path to file :param kwargs: :return: file

slycat.web.server.handlers.get_remote_host_dict()[source]
slycat.web.server.handlers.get_remote_image(hostname, path, **kwargs)[source]

Given a hostname and image path returns the image given by the path :param hostname: connection host name :param path: path to image :param kwargs: :return: image

slycat.web.server.handlers.get_remote_video(hostname, vsid)[source]

Given a hostname and vsid returns the video given by the vsid :param hostname: connection host name :param vsid: video uuid :return: video

slycat.web.server.handlers.get_remote_video_status(hostname, vsid)[source]

Given a hostname and vsid returns the video status given by the vsid :param hostname: connection host name :param vsid: video uuid :return: json

slycat.web.server.handlers.get_remotes(hostname)[source]

Returns {status: True} if the hostname was found in the user’s session :param hostname: connection host name :return: {“status”:status, “msg”:msg}

slycat.web.server.handlers.get_session_status(hostname)[source]
slycat.web.server.handlers.get_sid(hostname)[source]

Takes a hostname address and returns the established sid value base on what is found in the users session raises 400 and 404 :param hostname: name of the host we are trying to connect to :return: sid : uuid for the session name

slycat.web.server.handlers.get_table_metadata(file, array_index, index)[source]

Return table-oriented metadata for a 1D array, plus an optional index column.

slycat.web.server.handlers.get_table_sort_index(file, metadata, array_index, sort, index)[source]
slycat.web.server.handlers.get_time_series_names(hostname, path, **kwargs)[source]

Parse a time series csv for all column names :param hostname: connection host name :param path: path to csv file :param kwargs: :return: json object of column names

slycat.web.server.handlers.get_user(uid)[source]
slycat.web.server.handlers.get_user_config(hostname)[source]
slycat.web.server.handlers.get_wizard_resource(wtype, resource)[source]
slycat.web.server.handlers.job_time(nodes, tasks, size)[source]

gives the time in seconds recommended given job meta data :param nodes: number of hpc nodes for job :param tasks: number of tasks per node for job :param size: size of data file used in the job :return: json time in seconds as an integer {‘time-seconds’: 1800}

slycat.web.server.handlers.js_bundle()[source]
slycat.web.server.handlers.login()[source]

Takes the post object under cherrypy.request.json with the users name and password and determins with the user can be authenticated with slycat :return: authentication status

slycat.web.server.handlers.logout()[source]

See if the client has a valid session. If so delete it :return: the status of the request

slycat.web.server.handlers.model_command(mid, type, command, **kwargs)[source]
slycat.web.server.handlers.model_sensitive_command(mid, type, command)[source]
slycat.web.server.handlers.post_events(event)[source]
slycat.web.server.handlers.post_model_arrayset_data(mid, aid)[source]

get the arrayset data based on aid, mid, byteorder, and hyperchunks

requires hyperchunks to be included in the json payload

Parameters:
  • mid – model id
  • aid – artifact id
Returns:

stream of data

slycat.web.server.handlers.post_model_files(mid, input=None, files=None, sids=None, paths=None, aids=None, parser=None, **kwargs)[source]
slycat.web.server.handlers.post_model_finish(mid)[source]
slycat.web.server.handlers.post_project_bookmarks(pid)[source]
slycat.web.server.handlers.post_project_models(pid)[source]

When a pid along with json “model-type”, “marking”, “name” is sent with POST creates a model and saves it to the database :param pid: project ID for created model :return: json {“id” : mid}

slycat.web.server.handlers.post_project_references(pid)[source]
slycat.web.server.handlers.post_projects()[source]
slycat.web.server.handlers.post_remote_browse(hostname, path)[source]
slycat.web.server.handlers.post_remote_launch(hostname)[source]
slycat.web.server.handlers.post_remote_videos(sid)[source]
slycat.web.server.handlers.post_remotes()[source]

Given username, hostname, password as a json payload establishes a session with the remote host and attaches it to the users session :return: {“sid”:sid, “status”:boolean, msg:”“}

slycat.web.server.handlers.post_submit_batch(hostname)[source]
slycat.web.server.handlers.post_upload_finished(uid)[source]

ask the server to finish the upload :param uid: upload session ID :return: status of upload

slycat.web.server.handlers.post_uploads()[source]

creates a session for uploading a file to :return: Upload ID

slycat.web.server.handlers.put_model(mid)[source]
slycat.web.server.handlers.put_model_arrayset(mid, aid)[source]
slycat.web.server.handlers.put_model_arrayset_array(mid, aid, array)[source]
slycat.web.server.handlers.put_model_arrayset_data(mid, aid, hyperchunks, data, byteorder=None)[source]
slycat.web.server.handlers.put_model_inputs(mid)[source]
slycat.web.server.handlers.put_model_parameter(mid, aid)[source]
slycat.web.server.handlers.put_project(pid)[source]
slycat.web.server.handlers.put_reference(rid)[source]
slycat.web.server.handlers.put_upload_file_part(uid, fid, pid, file=None, hostname=None, path=None)[source]
slycat.web.server.handlers.require_array_json_parameter(name)[source]
slycat.web.server.handlers.require_boolean_json_parameter(name)[source]
slycat.web.server.handlers.require_integer_array_json_parameter(name)[source]
slycat.web.server.handlers.require_integer_parameter(value, name)[source]
slycat.web.server.handlers.require_json_parameter(name)[source]

checks to see if the parameter is in the cherrypy.request.json and errors gracefully if it is not there :param name: name of json param :return: value of the json param

slycat.web.server.handlers.run_agent_function(hostname)[source]
slycat.web.server.handlers.set_user_config(hostname)[source]
slycat.web.server.handlers.tests_request(*arguments, **keywords)[source]
slycat.web.server.handlers.validate_table_byteorder(byteorder)[source]
slycat.web.server.handlers.validate_table_columns(columns)[source]
slycat.web.server.handlers.validate_table_rows(rows)[source]
slycat.web.server.handlers.validate_table_sort(sort)[source]