You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Work-in-progress. Currently supports basic exampination of jobs and running predictions for query sequences and single site variants with PoET.
4
+
## Installation
5
5
6
-
Each module has a raw/low level set of functions that directly call the REST API endpoints. On top of that, a higher level interface exists for authenticating a session, then accessing the functionality via high-level APIs. Long running POST/GET paradigm calls return a Future object that can be polled to see if the result is ready, and then used to retrieve the result. It also implements an interface for synchronously waiting for the result.
6
+
You can install with pip:
7
7
8
+
```
9
+
pip install openprotein-python
10
+
```
8
11
## Getting started
9
12
10
13
First, create a session using your login credentials.
@@ -19,18 +22,10 @@ Given a future, check its status and retrieve results
19
22
```
20
23
future.refresh() # call the backend to update the job status
21
24
future.done() # returns True if the job is done, meaning the status could be SUCCESS, FAILED, or CANCELLED
25
+
future.wait() # wait until done and then fetch results, verbosity is controlled with verbose arg.
22
26
result = future.get() # get the result from a finished job
23
27
```
24
28
25
-
To wait for a job to finish and return the result, use `future.wait()`
26
-
```
27
-
# this will poll the backend for the job status every 2.5 seconds
28
-
# for up to 600 seconds. If it takes longer than 600 seconds for the result
29
-
# to be ready, this will raise a TimeoutException
30
-
# verbose=True will print the time elapsed and job status using `tqdm`
31
-
result = future.wait(interval=2.5, timeout=600, verbose=True)
32
-
```
33
-
34
29
35
30
### Jobs interface
36
31
@@ -40,44 +35,55 @@ session.jobs.list() # list all jobs
40
35
session.jobs.get(JOB_ID) # get a specific job
41
36
```
42
37
38
+
Resume an `AsyncJobFuture` from where you left off with each API's load_job:
0 commit comments