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

login(username, password)[source]#

Authenticate connection to OpenProtein with your credentials.

Parameters:
  • username (str) – username

  • password (str) – password

class openprotein.OpenProtein[source]#

The base class for accessing OpenProtein API functionality.

property jobs: JobsAPI#

The jobs submodule gives access to functionality for listing jobs and checking their status.

property data: DataAPI#

The data submodule gives access to functionality for uploading and accessing user data.

property train: TrainingAPI#

The train submodule gives access to functionality for training and validating ML models.

property align: AlignAPI#

The PoET submodule gives access to the PoET generative model and MSA and prompt creation interfaces.

property embedding: EmbeddingAPI#

The embedding submodule gives access to protein embedding models and their inference endpoints.

property design: DesignAPI#

The design submodule gives access to functionality for designing new sequences using models from train.

property fold: FoldAPI#

The fold submodule gives access to functionality for folding sequences and returning PDBs.