mkt.databases.cbioportal.cBioPortal
- class mkt.databases.cbioportal.cBioPortal[source]
Bases:
APIKeySwaggerClientClass 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 API object.
Get cBioPortal instance.
get_url()Get cBioPortal API URL.
Get API token, if available.
Query a Swagger API and return result.
set_api_key()Set API key for cBioPortal API.
Attributes
__dataclass_fields____dataclass_params____match_args___cbioportalcBioPortal API object (post-init).
from_cacheWhether the most recent response was served from requests-cache.
cBioPortal instance.
query_datetimeUTC datetime the underlying network query was made (cache creation time if served from cache).
cBioPortal API URL.
- __init__() None
- 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.