openprotein.OpenProtein#
- class openprotein.OpenProtein(username=None, password=None, backend='https://api.openprotein.ai/api/', timeout=180)[source]#
The base class for accessing OpenProtein API functionality.
- Parameters:
username (str | None)
password (str | None)
backend (str)
timeout (int)
- __init__(username=None, password=None, backend='https://api.openprotein.ai/api/', timeout=180)#
- Parameters:
username (str | None)
password (str | None)
backend (str)
timeout (int)
Methods
__init__([username, password, backend, timeout])close()Closes all adapters and as such the session
delete(url, **kwargs)Sends a DELETE request.
get(url, **kwargs)Sends a GET request.
get_adapter(url)Returns the appropriate connection adapter for the given URL.
get_redirect_target(resp)Receives a Response.
head(url, **kwargs)Sends a HEAD request.
load_job(job_id)login(username, password)Authenticate connection to OpenProtein with your credentials.
merge_environment_settings(url, proxies, ...)Check the environment and merge it with some settings.
mount(prefix, adapter)Registers a connection adapter to a prefix.
options(url, **kwargs)Sends a OPTIONS request.
patch(url[, data])Sends a PATCH request.
post(url[, data, json])Sends a POST request.
prepare_request(request)Constructs a
PreparedRequestfor transmission and returns it.put(url[, data])Sends a PUT request.
rebuild_auth(prepared_request, response)When being redirected we may want to strip authentication from the request to avoid leaking credentials.
rebuild_method(prepared_request, response)When being redirected we may want to change the method of the request based on certain specs or browser behavior.
rebuild_proxies(prepared_request, proxies)This method re-evaluates the proxy configuration by considering the environment variables.
request(method, url, *args, **kwargs)Constructs a
Request, prepares it and sends it.resolve_redirects(resp, req[, stream, ...])Receives a Response.
send(request, **kwargs)Send a given PreparedRequest.
should_strip_auth(old_url, new_url)Decide whether Authorization header should be removed when redirecting
wait(future, *args, **kwargs)wait_until_done(future, *args, **kwargs)Attributes
alignThe Align submodule gives access to the sequence alignment capabilities by building MSAs and prompts that can be used with PoET.
dataThe data submodule gives access to functionality for uploading and accessing user data.
designThe designer submodule gives access to functionality for designing new sequences using models from predictor train.
embeddingThe embedding submodule gives access to protein embedding models and their inference endpoints.
embeddingsThe embedding submodule gives access to protein embedding models and their inference endpoints.
foldThe fold submodule gives access to functionality for folding sequences and returning PDBs.
jobsThe jobs submodule gives access to functionality for listing jobs and checking their status.
modelsThe models submodule provides a unified entry point to all protein models.
predictorThe predictor submodule gives access to training and predicting with predictors built on top of embeddings.
promptThe Align submodule gives access to the sequence alignment capabilities by building MSAs and prompts that can be used with PoET.
svdThe embedding submodule gives access to protein embedding models and their inference endpoints.
umapThe embedding submodule gives access to protein embedding models and their inference endpoints.
headersA case-insensitive dictionary of headers to be sent on each
Requestsent from thisSession.authDefault Authentication tuple or object to attach to
Request.proxiesDictionary mapping protocol or protocol and host to the URL of the proxy (e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}) to be used on each
Request.hooksEvent-handling hooks.
paramsDictionary of querystring data to attach to each
Request.streamStream response content default.
verifySSL Verification default.
certSSL client certificate default, if String, path to ssl client cert file (.pem).
max_redirectsMaximum number of redirects allowed.
trust_envTrust environment settings for proxy configuration, default authentication and similar.
cookiesA CookieJar containing all currently outstanding cookies set on this session.