but in td you cant (you need to append project.folder to sys.path) but that defeats the purpose
Do that on init. You can then use the importlib module to actualy import the module after appending the project folder to the sys path. Put all of that in the init of your extension to do that on startup (check if project folder is already in sys.path to not overdo it) and you are good to go.
In a real world scenario the (python) dependencies you are simultaneously developing for a certain (TD) project are spread across multiple folders outside of the project folder. And as these are source/git folders, their code (the actual package) is likely in a subfolder.
So we would need to append all those (sub)folders to sys path, which is a bad workflow and introduces too much potential for errors (and I couldn’t do it in an extensions init as in some cases the import needs to happen before extensions are initialized)
Pythons already existing solution to this is editable installs, where a link file is created in site-packages (pointing to the dependency source folder) and you only need to make sure that your venv/site-packages is in your pythonpath.