Skip to content

academy.exchange.cloud.scopes

get_academy_exchange_client_id

get_academy_exchange_client_id() -> str

Get the client id of the academy_exchange.

The environment variable can be used for testing, otherwise the default value is the id of the hosted exchange.

Source code in academy/exchange/cloud/scopes.py
def get_academy_exchange_client_id() -> str:
    """Get the client id of the academy_exchange.

    The environment variable can be used for testing, otherwise the
    default value is the id of the hosted exchange.
    """
    try:
        return os.environ[ACADEMY_EXCHANGE_CLIENT_ID_ENV_NAME]
    except KeyError:
        return DEFAULT_EXCHANGE_CLIENT_ID

get_academy_exchange_secret

get_academy_exchange_secret() -> str

Get the secret of the academy_exchange.

Source code in academy/exchange/cloud/scopes.py
def get_academy_exchange_secret() -> str:
    """Get the secret of the academy_exchange."""
    return os.environ[ACADEMY_EXCHANGE_SECRET_ENV_NAME]

get_academy_exchange_scope_id

get_academy_exchange_scope_id() -> str

Get the id of the academy_exchange scope.

The environment variable can be used for testing, otherwise the default value is the id of the scope associated with the hosted exchange.

Source code in academy/exchange/cloud/scopes.py
def get_academy_exchange_scope_id() -> str:
    """Get the id of the academy_exchange scope.

    The environment variable can be used for testing, otherwise the default
    value is the id of the scope associated with the hosted exchange.
    """
    try:
        return os.environ[ACADEMY_EXCHANGE_SCOPE_ID_ENV_NAME]
    except KeyError:
        return DEFAULT_EXCHANGE_SCOPE_ID