I have a flask app that I'm trying to get running via docker. I'm hitting a problem where one of the modules can't import another, a simplified version of my file structure is this:
app.
+-- README.txt
+-- source_directory
| +-- source_configs.py
+-- libs
| +-- api
| | +-- api.py
| +-- header.py
+-- _data
| +-- jira_extra.py
+-- _site
+-- main.py
The file jira_extra.py has this top import
from /app/libs/api import api
But I'm getting the error
Traceback (most recent call last):
File "./data/jira_extra.py", line 23
from /app/libs/api import api
SyntaxError: invalid syntax
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
Is there a different way to import custom modules from other directories?