openprotein.APISession#
Create an authorized connection to OpenProtein.AI backend.
- class openprotein.APISession[source]#
A class to handle API sessions. This class provides a connection session to the OpenProtein API.
- Parameters:
username (str) – The username of the user.
password (str) – The password of the user.
Examples
>>> session = APISession("username", "password")
- __init__(username, password, backend='https://api.openprotein.ai/api/', timeout=180)[source]#
- Parameters:
username (str)
password (str)
backend (str)
timeout (int)
- post(url, data=None, json=None, **kwargs)[source]#
Sends a POST request. Returns
Response
object.- Parameters:
url – URL for the new
Request
object.data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the
Request
.json – (optional) json to send in the body of the
Request
.**kwargs – Optional arguments that
request
takes.
- Return type:
requests.Response
- class openprotein.OpenProtein[source]#
The base class for accessing OpenProtein API functionality.
- property data: DataAPI#
The data submodule gives access to functionality for uploading and accessing user data.
- property jobs: JobsAPI#
The jobs submodule gives access to functionality for listing jobs and checking their status.
- property align: AlignAPI#
The Align submodule gives access to the sequence alignment capabilities by building MSAs and prompts that can be used with PoET.
- property embedding: EmbeddingsAPI#
The embedding submodule gives access to protein embedding models and their inference endpoints.
- property embeddings: EmbeddingsAPI#
The embedding submodule gives access to protein embedding models and their inference endpoints.
- property svd: SVDAPI#
The embedding submodule gives access to protein embedding models and their inference endpoints.
- property umap: UMAPAPI#
The embedding submodule gives access to protein embedding models and their inference endpoints.
- property predictor: PredictorAPI#
The predictor submodule gives access to training and predicting with predictors built on top of embeddings.