Boa Python Api

A python api that will let users write queries using boa

Link to project

Available Methods

Installing Package

# In Terminal >>> pip install boa-api

login

Description: log into the boa framework using the remote api Parameters: username (`str): username for boa account password (`str): password for boa account Returns:

datasets

Description: Retrieves datasetsets currently provided by boa Parameters: Returns: (`list): a list of boa datasets

close

Description: Log out of the boa framework using the remote api Parameters: Returns:

dataset_names

Description Retrieves a list of names of all datasets provided by boa Parameters: Returns: (`list): the names of available datasets

get_dataset

Description: Retrieves a dataset given a name. Parameters: name (`str): The name of the input dataset to return. Returns: (`dict): a dictionary with the keys id and name

last_job

Description: Retrieves the most recently submitted job Parameters: Returns: (`job_handle): the last submitted job

job_count

Description: Retrieves the number of jobs submitted by a user Parameters: pub_only (`bool, optional): if true, return only public jobs otherwise return all jobs Returns: (`int) the number of jobs submitted by a user

query

Description: Submits a new query to Boa to query the specified and returns a handle to the new job. Parameters: query (str): a boa query represented as a string. dataset (str, optional): the name of the input dataset. Returns: (`job_handle): the job with the generated from the given query

get_job

Description: Retrieves a job given an id. Parameters: id (int): the id of the job you want to retrieve Returns: (`job_handle): the desired job.

job_list

Description Parameters pub_only (`bool, optional): if true, only return public jobs otherwise return all jobs offset (`int, optional): the starting offset length (`int, optional): the number of jobs (at most) to return Returns: list: a list of jobs

stop

Description Stops the execution of a job Parameters: (`job_handle): the job whose execution you want to stop

resubmit

Description Resubmits a job to the framework Parameters: job (`job_handle)

delete

Description Deletes this job from the framework. Parameters: job (`job_handle) Returns:

set_public

Description Modifies the public/private status of this job. Parameters: is_public (bool): 'True' to make it public, False to make it private job (`job_handle) Returns:

public_status

Description Return the jobs public/private status. Parameters: job (`job_handle) Returns:

get_url

Description Retrieves the jobs URL. Parameters: job (`job_handle) Returns:

public_url

Description Get the jobs public page URL. Parameters: job (`job_handle) Returns:

get_compiler_errors

Description Return the output for this job, if it finished successfully and has an output. Parameters: job (`job_handle) Returns:

source

Description Return the source query for this job. Parameters: job (`job_handle) Returns:

output

Description Return the output for this job, if it finished successfully and has an output. Parameters: job (`job_handle) Returns: