path = "auth.my_auth.AUTH" # 根據path實例化AUTH類
path = "auth.my_auth.AUTH" import importlib model_path, class_name = path.rsplit(".", 1) model = importlib.import_module(model_path) # 根據"auth.my_auth"導入my_auth模塊 obj = getattr(model, class_name)() # 反射並實例化