This one isn't actually too difficult to implement, just use the importlib mechanism
spec = importlib.util.spec_from_file_location(
name=Path(filename).stem,
location=filename)
self.module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(self.module)