mkt.databases.oncokb.OncoKBInfo
- class mkt.databases.oncokb.OncoKBInfo(url: str = 'https://www.oncokb.org/api/v1', header: dict = <factory>)[source]
Bases:
OncoKBOncoKB API client for OncoKB information.
- __init__(url: str = 'https://www.oncokb.org/api/v1', header: dict = <factory>) None
Methods
__eq__(other)Return self==value.
__init__([url, header])__post_init__()Initialize the OncoKB 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_response(res)Check the response status code for errors.
extract_level_as_int(str_in)Extract the level from a string and convert it to an integer.
has_json()Get the JSON response from the OncoKB API query.
maybe_get_token()Get API token, if available.
query_api()Query the OncoKB API for a given URL.
set_api_key()Set API token for REST API.
Update the URL for the OncoKB API query based on the gene name.
Attributes
__dataclass_fields____dataclass_params____match_args___jsonfrom_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).
urlBase URL for the OncoKB API.
url_queryURL to update for specific queries.
headerOncoKB API token, if available.