If I have this hierarchy
A
|- __init__.py
|-B
|- __init__.py
|- funcitons.py
(which contains def my_function(): pass)
and I have package A
installed, I can do the following
from A.B import functions
functions.my_function()
or
from A.B.functions import my_function
my_function()
How to accomplish the same result if B is encapsulated in several subfolders (which are not packages)?