mkt.databases.cbioportal.cBioPortal

class mkt.databases.cbioportal.cBioPortal[source]

Bases: APIKeySwaggerClient

Class to interact with the cBioPortal API.

__init__() None

Methods

__eq__(other)

Return self==value.

__init__()

__post_init__()

Post-initialization to set up cBioPortal 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.

get_cbioportal()

Get cBioPortal API object.

get_instance()

Get cBioPortal instance.

get_url()

Get cBioPortal API URL.

maybe_get_token()

Get API token, if available.

query_api()

Query a Swagger API and return result.

set_api_key()

Set API key for cBioPortal API.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

_cbioportal

cBioPortal API object (post-init).

from_cache

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

instance

cBioPortal instance.

query_datetime

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

url

cBioPortal API URL.

__init__() None
get_cbioportal()[source]

Get cBioPortal API object.

get_instance()[source]

Get cBioPortal instance.

get_url()[source]

Get cBioPortal API URL.

instance: str = ''

cBioPortal instance.

maybe_get_token()[source]

Get API token, if available.

Returns:

API token if available; None otherwise

Return type:

str | None

query_api()[source]

Query a Swagger API and return result.

Parameters:

url (str) – API URL

Returns:

API response

Return type:

SwaggerClient

url: str = ''

cBioPortal API URL.