from importlib import import_module from typing import Type from transip_client.adapters import Adapter def import_string(path: str) -> Type[Adapter]: module_path, class_name = path.rsplit(".", 1) module = import_module(module_path) return getattr(module, class_name)