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: RESTAPIClient

Class 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_api()

Query the AlphaFold prediction endpoint and populate _json.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

__pydantic_config__

_json

JSON response from the AlphaFold API.

from_cache

Whether the most recent response was served from requests-cache.

headers

Header for the API request.

query_datetime

UTC datetime the underlying network query was made (cache creation time if served from cache).

url

Base URL for the AlphaFold EBI API.

uniprot_id

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.