Closed tsalkenov closed 1 year ago
It's ok when you have few packages, but once your project grows it's good to explicitly show that the package you are importing is local via from src.notifications import client
rather than from notifications import client
So there is no way to avoid using sys.path.append()?
I think the only reason you have to do that is improper project startup. You can check this template.
In short, I start projects from the root folder with python -m src.main
so that interpreter knows the project boundaries and packages
Oh i get it now, my interpreter was treating python files like they were separate. Now i get how it works thank you so much. Your this repository is a lifesaver. Thank you again for letting us learn from your experience
using sys.path.append in every file to access src doesn't seem like such a great idea to me. Maybe I'm doing it wrong i don't know a proper way to do this