Files
snake-python/server/storage/__init__.py
T

7 lines
264 B
Python

class StorageLoader:
@classmethod
def build(self, selected_storage: str):
storage_module = __import__(f"server.storage.{selected_storage}", fromlist=[selected_storage])
storage_class = getattr(storage_module, selected_storage)
return storage_class