I need to access some functions form create_database.py
from my app.py
file. Is this possible?
This is structure of my folder:
application
├── database
│ └── create_database.py
└── microservice
└── app.py
I was looking for solution and only found two codes that could help me but they didn't work for me.
sys.path.append('path/to/folder')
and thanimport create_database.py
. If i got this right it should work with full path but I need to be able to work with relative path since this app is going to be dockerized on server.from database.create_database import User
this throwsModuleNotFoundError: No module named 'database'
here I also tried to create empty__init__.py
in database folder but that also didn't help.