I feel what I have is quite a simple question but I am struggling to make this work. I am using Bokeh 2.0.1 server to try and serve up an application, but I need to import some custom classes to help me interact with our internal API. The folder structure looks a bit like:
| main.py | folder | > subfolder_a | >> class_a.py | > subfolder_b | >> class_b.py
What I would like to do is include:
from folder.subfolder_a.class_a import ClassA
main.py and since inside
class_a.py it has:
from folder.subfolder_b.class_b import ClassB
It will import the classes correctly. However, I cannot get this to work, I keep getting ModuleNotFound errors.
How do I import classes from subfolders?
(The reason I want to do this, other than to keep the code tidy is that I am using existing classes from another project and I’d rather not edit them if possible)