mkt.databases.chembl.ChEMBL
- class mkt.databases.chembl.ChEMBL(id: str, url_suffix: str, url_base: str = 'https://www.ebi.ac.uk/chembl/api/data', url_query: str | None = None, params: dict = <factory>, verbose: bool = False, _json: dict | None = None)[source]
Bases:
RESTAPIClientChEMBL API client.
- __init__(id: str, url_suffix: str, url_base: str = 'https://www.ebi.ac.uk/chembl/api/data', url_query: str | None = None, params: dict = <factory>, verbose: bool = False, _json: dict | None = None) None
Methods
__eq__(other)Return self==value.
__init__(id, url_suffix[, url_base, ...])__post_init__()Initialize the ChEMBL API client.
_stamp_from_response(res)Record query datetime + cache provenance from a requests-cache response.
_stamp_now()Record current UTC datetime; cache provenance unknown.
Check that a single molecule is returned for the query.
check_response(res)Check the response status code for errors.
Get the ChEMBL ID for the queried molecule.
Query the ChEMBL API for a given URL.
update_params(**kwargs)Update the parameters for the API query.
update_url(url)Update the URL for querying the ChEMBL API.
Attributes
__dataclass_fields____dataclass_params____match_args___jsonJSON response from the API query.
from_cacheWhether the most recent response was served from requests-cache.
query_datetimeUTC datetime the underlying network query was made (cache creation time if served from cache).
Base URL for the ChEMBL API.
URL query for specific queries.
Flag to enable verbose logging.
ID for querying specific entities.
URL suffix to update for specific queries.
Parameters for the API query.
- __init__(id: str, url_suffix: str, url_base: str = 'https://www.ebi.ac.uk/chembl/api/data', url_query: str | None = None, params: dict = <factory>, verbose: bool = False, _json: dict | None = None) None
- id: str
ID for querying specific entities.
- params: dict
Parameters for the API query.
- url_base: str = 'https://www.ebi.ac.uk/chembl/api/data'
Base URL for the ChEMBL API.
- url_query: str | None = None
URL query for specific queries.
- url_suffix: str
URL suffix to update for specific queries.
- verbose: bool = False
Flag to enable verbose logging.