# -*- coding: utf-8 -*-
from __future__ import annotations

import typing

from hotpocket_common.loader import load_module_attribute

from .conf import settings


def get_adapter(setting: str, default: str) -> typing.Any:
    import_path = getattr(settings, setting, default)
    return load_module_attribute(import_path)
