mkt.databases.oncokb.OncoKBInfo

class mkt.databases.oncokb.OncoKBInfo(url: str = 'https://www.oncokb.org/api/v1', header: dict = <factory>)[source]

Bases: OncoKB

OncoKB 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_url()

Update the URL for the OncoKB API query based on the gene name.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

_json

from_cache

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

query_datetime

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

url

Base URL for the OncoKB API.

url_query

URL to update for specific queries.

header

OncoKB API token, if available.

update_url()[source]

Update the URL for the OncoKB API query based on the gene name.