playsdk v.0.1 documentation (Python)
A practical introduction to the Python client to consume PlayMolecule Web Services (PMWS)Obtain your API key here
- 0. Introduction
- 1. playskd Installation
- 1.1 Miniconda installation
- 1.2 playsdk installation
- 2. Session object
- 2.1 session = Session([token])
- 2.2 session.listApps()
- 2.3 job = session.startApp([appName])
- 2.4 session.listJobs()
- 2.5 session.getJob([jobId])
- 3. Job object
- 2.1 job.describe()
- 2.2 job.argName = [value]
- 2.3 job.submit()
- 2.4 job.getStatus()
- 2.5 job.retrieve()
PlayMolecule client lets you focus on the research while PlayMolecule Web Services takes care of the rest.
2.1 Miniconda installation
Install miniconda from the conda repository.
2.2 playsdk installation
Install the PlaySDK package by running:
Now you can use playsdk from your favorite python editor, such as the interactive shell ipython.
2. Session object
2.1 session = Session([token])
Allows to create a PlayMolecule Web Services (PMWS) session with credentials provided by the API key (token). Remember that you can find your API key in the user page after you logged in.
From this point on, we assume you have created a session with your valid API key.
Lists all available apps and describes them shortly. The field Name is a unique identifier used to launch new jobs.
2.3 job = session.startApp([appName])
Allows to instantiate an application with name appName, creating a new Job object.
Displays the status of current existing jobs, including the jobid and the status.
Instantiates a Job object from an existing known jobId.
3. Job object
Describes the Job and lists the arguments accepted by a particular application. Default values for each argument are visible in the Value column.
3.2 job.argName = [value]
Arguments/attributes for an application can be inputted through the job.argName = [value] notation.
Note how the Value field for the argument changes in respect the previous default value.
Submits a Job.
Retrieves the status of a Job.
Retrieves the Job at the folder specified in job.output (by default the current directory).
A folder with the id of the job will be created with the contents of the application output.