mkt.databases.config

Environment-variable configuration for cBioPortal, OncoKB, and the requests cache.

Module-level get_*/set_* functions read and write os.environ for the cBioPortal instance and token, OncoKB token, and requests-cache path, re-exporting the output-directory helpers from mkt.schema.config.

Module Attributes

CBIOPORTAL_INSTANCE_VAR

Environment variable for cBioPortal instance; if none provided, default is www.cbioportal.org in CLI scripts

CBIOPORTAL_TOKEN_VAR

Environment variable for cBioPortal token; if none provided, default is None in CLI scripts

REQUESTS_CACHE_VAR

Environment variable for request cache file prefix; if none provided, default is requests_cache in CLI scripts

ONCOKB_TOKEN_VAR

Environment variable for OncoKB token; if none provided, default is None in CLI scripts

Functions

get_cbioportal_instance()

Get the cBioPortal instance from the environment.

maybe_get_cbioportal_token()

Get the cBioPortal token from the environment.

maybe_get_oncokb_token()

Get the OncoKB token from the environment.

maybe_get_request_cache()

Get the request cache path from the environment.

set_cbioportal_instance(val)

Set the cBioPortal instance in the environment variables.

set_cbioportal_token(val)

Set the cBioPortal token in the environment variables.

set_oncokb_token(val)

Set the OncoKB token in the environment variables.

set_request_cache(val)

Set the request cache path in environment variables.

mkt.databases.config.get_output_dir() str | None[source]

Get the output directory from the environment.

Returns:

str | None

Output directory path if exists, otherwise None

mkt.databases.config.set_output_dir(val: str) None[source]

Set the output directory in environment variables.

Parameters:

valstr

Output directory path

Returns:

None