I a trying to run and use a python package on a remote machine without deploying or installing the package.
In the following link it's nicely described how to create a string importer for modules. modules files are read and stored as text in a dictionary. stored in memory and loaded using StringImporter import hook.
I can use the same implementation, read my modules into a dictionary, ship the same dictionary using socket communication and use the same StringImporter on remote machine to import the module.
But I am still struggling to ship a package that looks like the following
my_package
|-- __init__.py
|-- module1.py
|-- sub_package
|-- __init__.py
|-- module2.py
|-- module3.py