Adapter refactor
Some checks failed
ci/woodpecker/push/tests Pipeline failed

Allows using different ways to retrieve hosts IP address
This commit is contained in:
Sonny Bakker 2025-05-03 13:12:13 +02:00
parent 97cf1a8f5c
commit e93d864ae1
15 changed files with 861 additions and 710 deletions

10
transip_client/utils.py Normal file
View file

@ -0,0 +1,10 @@
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)