mkt.databases.api_schema.APIKeySwaggerClient

class mkt.databases.api_schema.APIKeySwaggerClient[source]

Bases: SwaggerAPIClient, ABC

Base class for Swagger API clients with API key support.

__init__() None

Methods

__eq__(other)

Return self==value.

__init__()

_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.

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__

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).

abstract maybe_get_token() str | None[source]

Get API token, if available.

Returns:

API token if available; None otherwise

Return type:

str | None

set_api_key() RequestsClient[source]

Set API key for cBioPortal API.

Returns:

RequestsClient object with API key set

Return type:

RequestsClient