1👍
✅
If mymodule
is a package itself and its containing folder is in your environment’s PYTHONPATH
, import the class via:
from lib.mod import ModClient
Then you should be able to instantiate the class in the view and call methods on the instance:
mc = ModClient()
accounts = mc.get_accounts(token)
A proper IDE (PyCharm, Eclipse, etc.) will do auto-imports for you.
Source:stackexchange.com