mkt.databases.alphafold.AlphaFoldPrediction
- class mkt.databases.alphafold.AlphaFoldPrediction(uniprot_id: str, url: str = 'https://alphafold.ebi.ac.uk/api', headers: str = "{'Accept': 'application/json'}", _json: dict | None = None)[source]
Bases:
RESTAPIClientClass to query the AlphaFold EBI prediction API for a given UniProt accession.
Parameters:
- uniprot_idstr
UniProt accession (e.g. “P00533”).
- __init__(*args: Any, **kwargs: Any) None
Methods
__eq__(other)Return self==value.
__post_init__()_stamp_from_response(res)Record query datetime + cache provenance from a requests-cache response.
_stamp_now()Record current UTC datetime; cache provenance unknown.
check_response(res)Check the response status code for errors.
Query the AlphaFold prediction endpoint and populate _json.
Attributes
__dataclass_fields____dataclass_params____match_args____pydantic_config___jsonJSON response from the AlphaFold API.
from_cacheWhether the most recent response was served from requests-cache.
Header for the API request.
query_datetimeUTC datetime the underlying network query was made (cache creation time if served from cache).
Base URL for the AlphaFold EBI API.
UniProt accession to query.
- headers: str = "{'Accept': 'application/json'}"
Header for the API request.
- query_api() None[source]
Query the AlphaFold prediction endpoint and populate _json.
Returns:
None
- uniprot_id: str
UniProt accession to query.
- url: str = 'https://alphafold.ebi.ac.uk/api'
Base URL for the AlphaFold EBI API.