I'm importing modules into memory from a URL and throws it into the RAM using httpimport.
Consider the code:
url = '..........'
with httpimport.remote_repo(['myModels'], url):
from myModels.EmployeeModel import DefaultEmployeeModel
myImportedModelInstance = DefaultEmployeeModel()
I have a
- ZIP file that's called
myModels.zip - and inside it there's a folder called
myModels - and inside that folder there's a file called
EmployeeModelthat exportsDefaultEmployeeModel
I want to support multiple HTTP Imports as above , but the myModels and DefaultEmployeeModel are hardcoded.
How can we do that dynamically , meaning inject myModels and inject DefaultEmployeeModel when needed ?